|
PHP复制代码
$condition .= "cate.id = 1 or cate.path like '%,1,%'";
$this->db->where($condition)->get('article',10);
echo($this->db->last_query());
复制代码
生成的SQL代码是:
SELECT * FROM `ev_article` WHERE `ev_cate`.`id` = 1 OR `cate`.`path ` like '%,1,%'" LIMIT 1, 20
前面的cate会自动加上前缀,而后面的前缀却没有加上前缀,这是为什么呢?
请高手指点!! |
|