|
PHP复制代码 public function test ()
{
$res = $this->db->select('id')->where('id!=', 1)->get('char')->row_array();
var_dump($this->db->last_query());exit;
} 复制代码
显示错误:
A Database Error Occurred Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1' at line 3
SELECT `id`FROM (`char`)WHERE `id!=` 1
Filename: D:\Web\wamp\www\maimoe\system\database\DB_driver.php
Line Number: 330
之前用where('id!=', 1)这种写法未出现过错误,手册中也说明可以这样编写,可是今天突然出现这个问题。
|
|