Hi all,
I want to know is set_relation function can be nested like this :
$crud->set_relation('idph','mkt_ph','{no} - {(SELECT mkt_customer.nama FROM mkt_customer WHERE mkt_ph.idcustomer = mkt_customer.id)}','status_project <> "Selesai"');
This give me error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' mkt_customer.nama FROM mkt_customer WHERE mkt_ph.idcus' at line 1 SELECT mkt_ph.id, CONCAT('', COALESCE(no, ''), ' - ', COALESCE((SELECT mkt_customer.nama FROM mkt_customer WHERE mkt_ph.idcustomer = mkt_customer.id), ''), '') as s374da55c FROM (`mkt_ph`) WHERE `status_project` <> "Selesai" ORDER BY `s374da55c` Filename: D:\xampp\htdocs\ss\system\database\DB_driver.php
But if i try run the sql that generate from the error above to phpmyadmin->mysql , it work (please see attachment).
I dont know, is it problem with codeigniter or GC not functioned for this.
Thanks.