如何使用LIKE OR运算符使用cakephp& mysql [英] How to use LIKE OR operator using cakephp & mysql
本文介绍了如何使用LIKE OR运算符使用cakephp& mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是cakephp&不知道使用的语法是什么 LIKE &
I am new to cakephp & don't know what is the syntax to use LIKE & OR operator in cakephp with mysql.
任何人都可以帮助我吗?
谢谢..
Can anyone help me? Thanks..
推荐答案
$this->Post->find('first', array (
"Author.name" => "Bob",
"OR" => array (
"Post.title LIKE" => "%magic%",
"Post.created >" => date('Y-m-d', strtotime("-2 weeks"))
)
));
这篇关于如何使用LIKE OR运算符使用cakephp& mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文