1
I’m using this code:
/* Select Count de Ativos */
$tativos = "SELECT count(*) from ativos";
$lista_ativos = mysqli_query($tativos);
if(!$lista_ativos)
{
die("Erro no Banco - CONTAR ATIVIDADES PENDENTES");
}
/* Fim do Select Count de Ativos */
In order to count how many records I have in my table ativos
from the database, I ran the query
above, however the query
ta dying, ie in my browser is showing the message:
Bank Error - COUNT PENDING ACTIVITIES
I am connected to the database by the session system.
The procedural call of
mysqli_query
expects two parameters. Shouldn’t you be passing the connection object with the bank as well? By the way, if this did not show the error on the screen I would suggest you review your development server settings. Development environment that hides error is not a good environment.– Woss
Thanks for your attention Anderson. You indicate some development server?
– Ruan
There is an example of
php.ini
in the official PHP repository recommending some settings: https://github.com/php/php-src/blob/master/php.ini-development. Start by studying them and adapting them to your needs.– Woss
I will read it now. I thank you once again for your attention.
– Ruan