Home > other >  PHP code to check if the database table is empty or not?
PHP code to check if the database table is empty or not?

Time:10-30

In php do we have a code that checks to see if the database table is empty if it is empty?

And if it was empty, show false

CodePudding user response:

You can check with the query may help us.

SELECT EXISTS (SELECT 1 FROM table);

CodePudding user response:

you can check if(empty ($array)) where you get your data

  • Related