Breaking News
Home / Web / PHP / PHP Snippets / Check if Mysql table exists using Php?

Check if Mysql table exists using Php?

Php SQL ScriptAt times we want to find if a tables exists in a database.The snippet below shows how this can be done.

It open a db connection or reuse an already db connection, then selects the given database and finally executes a sql to find out whether the table exists or not. <!>

 

 

[pb_builder]

Check Also

How to list files in a directory in PHP?

<?php if ($handle = opendir(‘/path/to/directory’)) {     echo "Directory handle: $handlen";     echo …

Advertisment ad adsense adlogger