Active record - incorrect compiled query - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Active record - incorrect compiled query (/showthread.php?tid=40523) |
Active record - incorrect compiled query - El Forum - 04-11-2011 [eluser]airween[/eluser] Hello there, here is my parts of query: Code: $this->db->select("SQL_CALC_FOUND_ROWS pw.partnerworkerid AS pwid, (I hope this the right relevant code, there are several statements...) This has compile this query: Code: SELECT pw.partnerworkerid AS pwid, CONCAT(pw.firstname, " ", pw.lastname) AS wname, pw.arrangement AS arrangement, p.compname AS compname, pw.phone1 AS phone1, pw.email AS email, a.name_short AS agencyname but the expected query should be: Code: SELECT pw.partnerworkerid AS pwid, CONCAT(pw.firstname, " ", pw.lastname) AS wname, pw.arrangement AS arrangement, p.compname AS compname, pw.phone1 AS phone1, pw.email AS email, a.name_short AS agencyname so, the different is after first clause should be "OR", instead of "AND". How can I do that? Thanks: a. Active record - incorrect compiled query - El Forum - 04-11-2011 [eluser]osci[/eluser] read this post Active record - incorrect compiled query - El Forum - 04-11-2011 [eluser]airween[/eluser] Thanks, I'll check it out. cheers: a. |