示例#1
0
 /**
  * Checks to see if table exists
  *
  * @param string $table name of database table looking for
  *
  * @return bool true if exists or false if doesnt
  */
 public function tableExists($table)
 {
     $table = trim($table);
     $ret = false;
     if ($table != '') {
         $this->db->connect();
         $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix($table);
         $ret = false != $this->db->query($sql) ? true : false;
     }
     return $ret;
 }