簡體   English   中英

如何將SQL轉換為cakephp 2.8查詢從controller查詢

[英]How to convert SQL to cakephp 2.8 query to query from controller

SELECT * 
FROM `ads_partner_wises` 
WHERE app_code = 'XuS5II' 
AND acc_id = 89 
OR app_code = 0 
AND acc_id = 0

Cakephp 2.8 不工作查詢。

最后我的問題現在修復了 cakephp 2.8,

$test_data_qry = $this->AdsPartnerWises->find('all', array('conditions' => array(
            'AND' => array(
                'OR' => array(
                    'OR' => array('AdsPartnerWises.app_code' => 0, 'AdsPartnerWises.acc_id' => 0),
                    'AdsPartnerWises.app_code' => 'XuS5II', 'AdsPartnerWises.acc_id' => 89),))));

現在工作后使用這個謝謝。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM