【发布时间】:2015-03-05 12:41:34
【问题描述】:
$tmp_sales = $this->tmp_sale->find('all', array(
'conditions' => array(
array(
'no' => $no,
'barcode' => $barcode,'employee' => $emp, 'store' => $store_name
)
)
));
这是我目前的查询。
select * from tmp_sale where no = '$no' and
'employee' ='$emp' and store = '$store_name' and ( barcode='$barcode' or name='$barcode')
我想像上面那样做出改变。如何在 cakephp 中编写这样的查询
【问题讨论】:
-
阅读手册,里面有解释,包括例子:book.cakephp.org/2.0/en/models/…
标签: php cakephp cakephp-2.0 cakephp-1.3 cakephp-2.3