Possible Duplicate:
MySQL check if a table exists without throwing an exception
Basically I have my MySQL dbname = test and my table name = page.
I want to create a query using a php PDO to check if the table "page" exists in my db "test"
I've tried this but it doenst work.. it always tells me that it doesnt exists.. even when it does
if (array_search('pages',$db->query('show tables')->fetch()) !== false) { echo "the db exists";
} else { echo "the db doesnt exists";
// Create tableS
//$IDB->execute();
}