Dabei seit: 24.10.2002 Ort: - Alter: 48 Geschlecht:
Verfasst Di 13.07.2004 14:18 Titel
von php.net userbeitrag:
Code:
function mysql_table_exists($table, $link)
{
$exists = mysql_query("SELECT 1 FROM `$table` LIMIT 0", $link);
if ($exists) return true;
return false;
}
Note the "LIMIT 0", I mean come on, people, can't get much faster than that! :)
As far as a query goes, this does absolutely nothing. But it has the ability to fail if the table doesnt exist, and that's all you need!
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst an Umfragen in diesem Forum nicht mitmachen.
Mediengestalter.info ist ein Projekt von Webformatik:: Forensoftware: phpBB