简体   繁体   中英

multiple condition using CONCAT in codeigniter

iam using concat function but i cant use multiple condition in this function, only one condition allow while iam checking my result, please help me and give corect resolution and my code is bellow...

$this->db->select("pay_status,pay_invoiceid,GROUP_CONCAT(
                     CONCAT (jil_payment.pay_id,'-',jil_payment.pay_amount,IF ( 
                       jil_payment.pay_status='4','(submited)' 
                       AND jil_payment.pay_status='2','(deposited)'))) as paymentdetail");

Try to add FALSE arg like this :

$this->db->select("pay_status,pay_invoiceid,GROUP_CONCAT(
                   CONCAT (jil_payment.pay_id,'-',jil_payment.pay_amount,IF ( 
                   jil_payment.pay_status='4','(submited)' 
                   AND jil_payment.pay_status='2','(deposited)'))) as paymentdetail", FALSE);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM