I just uploaded my application to do a test on the server, sq always gives the error the following error
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/storage/5/71/81/cliente47/public_html/admin/filtros/tickets/EmAtendimentoTicket.php on line 34
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/storage/5/71/81/cliente47/public_html/admin/filtros/tickets/EmAtendimentoTicket.php on line 66
But on the local server this error does not happen.
The error stopped appearing after removing the following line:
and t.status = 'Em Atendimento'
But this line is responsible for the filter that this page has.
File: [InTicket.php]
<?php
include './function/dbh.php';
$pagina = (isset($_GET['pagina']))? $_GET['pagina'] : 1;
//Selecionar todos os usuario
$sql = "
SELECT
T.id_ticket,
T.assunto_ticket,
T.open_ticket,
T.id_cliente,
T.status,
C.id_cliente,
C.nomeFantasia_cliente
FROM
ticket AS T
INNER JOIN user_cliente AS C
ON
T.id_cliente = C.id_cliente and t.status = 'Em Atendimento'
ORDER BY
T.id_ticket ASC";
//Executando query
$ticket_cliente = mysqli_query($conn, $sql);
//Contar total de usuarios
$total_tickets = mysqli_num_rows($ticket_cliente );
//Definir quantidade de clientes a serem exibidos por paginacao
$quantidade_page = 6;
//Calcular o numero de paginas necessarias para exibir todos os allClientes
$num_paginas = ceil($total_tickets/$quantidade_page);
//Calcular o inicio da visualizacao
$inicio = ($quantidade_page*$pagina)-$quantidade_page;
//Selecionar os clientes a serem apresentados
$result_tickets = "
SELECT
T.id_ticket,
T.assunto_ticket,
T.open_ticket,
T.id_cliente,
T.status,
C.id_cliente,
C.nomeFantasia_cliente
FROM
ticket AS T
INNER JOIN user_cliente AS C
ON
T.id_cliente = C.id_cliente and t.status = 'Em Atendimento'
ORDER BY
T.id_ticket ASC
LIMIT
$quantidade_page OFFSET $inicio ";
$result = mysqli_query($conn, $result_tickets);
$total_tickets = mysqli_num_rows($result);
?>