【发布时间】:2012-01-10 13:43:23
【问题描述】:
我找到了类似这样的查询。
$this->paginate('Article', array('Article.status !=' => 'Inactive', 'Article.user_id !=' => $blocked_ids, 'Article.tags LIKE' => "%" . trim($this->params['url']['tag']) . "%"))
其中 $blocked_ids 是一个 id 数组。它会引发错误
SQL Error: 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 '= ('170')
当我删除 != 时,它工作正常。没有错误
感谢您的帮助。
【问题讨论】:
标签: php cakephp cakephp-1.3