public function tableExists($tables)
{
$tables = !is_array($tables) ? array($tables) : $tables;
$count = count($tables);
if ($count == 0) {
return false;
}
foreach ($tables as $i => $value) {
$tables[$i] = self::$prefix . $value;
}
$this->where('table_schema', $this->db);
$this->where('table_name', $tables, 'in');
$this->get('information_schema.tables', $count);
return $this->count == $count;
}