【发布时间】:2014-07-08 05:22:33
【问题描述】:
我有以下查询,其中interest 是字段名称。 interest 包含足球、排球等。
SELECT * FROM `drop_down_multiples` where find_in_set('football',`interest`);
我坚持在CakePHP 中转换上述查询。如何转换?
谢谢。
【问题讨论】:
标签: cakephp
我有以下查询,其中interest 是字段名称。 interest 包含足球、排球等。
SELECT * FROM `drop_down_multiples` where find_in_set('football',`interest`);
我坚持在CakePHP 中转换上述查询。如何转换?
谢谢。
【问题讨论】:
标签: cakephp
类似这样的事情:-
cakephp 没有任何功能,你必须做一些技巧,即 cakephp 如何构建 sql 从它们的语法中查询。
$this->DropDownMultiples->find('all',array(
'conditions'=>array('FIND_IN_SET("'.$search_field.'",DropDownMultiple.interest)')
));
【讨论】:
place_here_list 是什么意思?
'conditions'=>array('FIND_IN_SET("'.$search_field.'",DropDownMultiple.interest)')
interest 字段
find_in_set 的语法