Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/249.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php codeigniter中的declare NOT EXIST子句_Php_Mysql_Codeigniter - Fatal编程技术网

Php codeigniter中的declare NOT EXIST子句

Php codeigniter中的declare NOT EXIST子句,php,mysql,codeigniter,Php,Mysql,Codeigniter,如何在CodeIgniter中声明“notexist”子句而不使用db->query? 如果有任何函数存在,请告诉我,例如db->join。。。 非常感谢。如果要检查表,请执行此查询 $query = $this->db->query("SHOW TABLES LIKE mytable_name"); 它将生成名称为mytable\u name的表,如果不存在任何表,则结果为空 或者你也可以像这样试试 if ($this->db->table_exists('myta

如何在CodeIgniter中声明“notexist”子句而不使用db->query? 如果有任何函数存在,请告诉我,例如db->join。。。
非常感谢。

如果要检查表,请执行此查询

$query = $this->db->query("SHOW TABLES LIKE mytable_name"); 
它将生成名称为
mytable\u name
的表,如果不存在任何表,则结果为空

或者你也可以像这样试试

if ($this->db->table_exists('mytable_name')) {
   echo 'Table is already exists';
} else {
   CREATE table
}

如果要检查表,请执行此查询

$query = $this->db->query("SHOW TABLES LIKE mytable_name"); 
它将生成名称为
mytable\u name
的表,如果不存在任何表,则结果为空

或者你也可以像这样试试

if ($this->db->table_exists('mytable_name')) {
   echo 'Table is already exists';
} else {
   CREATE table
}

活动记录中没有“不存在”这样的条款。但是,您可以在
where
子句中传递“notexist子句”,如下所示:

$this->db->where('NOT EXISTS ');

活动记录中没有“不存在”这样的条款。但是,您可以在
where
子句中传递“notexist子句”,如下所示:

$this->db->where('NOT EXISTS ');
我想他是指…?我想他是指。。。?