title: Check if a MySQL database is empty using PHP
body: <p>Once a database is created how can it be checked if the database contains tables or table structure using PHP?</p>
  
  <p><strong>Scenario:</strong></p>
  
  <p>When the user accesses the system first time it creates a default database with no tables, then in the next step the user is supposed to import the customized database structure by uploading <code>.sql</code> file. I need to check if they have imported the database or has skipped that step by checking if the default database that was automatically created earlier has any table structure.</p>
  
  <p>When I executed <code>mysql_list_tables(defaultDBName)</code> it just returns <em>"<strong>Your SQL query has been executed successfully</strong>"</em>, but no result set in <strong>phpMyAdmin</strong>.</p>