In PHP, what would be the best way of seeing if a table exists?
This is what I am using so far
public function TableExists($table) { $res = $thi
An alternative to the SHOW TABLES approach from other answers is using the INFORMATION_SCHEMA like this:
SHOW TABLES
INFORMATION_SCHEMA
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'your_database_name' AND TABLE_NAME = 'tablename';