I have find query that looks like this.
$this->paginate('Article', array('Article.status !=' => 'Inactive', 'Article.user_id !=' => $blocked_ids, 'Article.tags LIKE' => "%" . trim($this->params['url']['tag']) . "%"))
where $blocked_ids is an array of ids. It throws an error
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')
When I removed !=
it works fine. No Errors
I appreciate any help.
$this->paginate(
'Article',
array (
'Article.status <>' => 'Inactive',
'Article.user_id !=' => $blocked_ids,
'Article.tags LIKE' => "%" . trim($this->params['url']['tag']) . "%"
)
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With