Esta función te permita comprobar la existencia de una tabla de Mysql

PHP:
  1. <?php
  2.  
  3. //nota: ya debe de tener una xconexion mysql existente
  4.  
  5. function table_exists ($table, $db) {
  6.     $tables = mysql_list_tables ($db);
  7.     while (list ($temp) = mysql_fetch_array ($tables)) {
  8.         if ($temp == $table) {
  9.             return TRUE;
  10.         }
  11.     }
  12.     return FALSE;
  13. }
  14.  
  15.  
  16. if (table_exists("Tabla", "Database")) {
  17.     echo "Si exste.";
  18. }
  19. ?>

Popularidad: 14%