Welcome Guest, Not a member yet? Register   Sign In
Help with RIGHT JOIN conversion?
#8

(01-22-2020, 02:45 PM)php_rocs Wrote: @nfoboy,

For future reference.

Query binding allows you to write a full sql statement with or without any variables that are needed to complete the query.

$sql = "SELECT p.id, p.lat, l.FK_Property FROM property as p LEFT JOIN liked_property as l ON l.FK_Property = p.id and l.FK_Renter = 2";
$this->db->query($sql);
Thanks... I'm trying to get my CI Judo up to snuff, and having to translate SQL to CI, has been driving me batty at times. I can use this as a last resort to push what I need through....
Reply


Messages In This Thread
Help with RIGHT JOIN conversion? - by nfoboy - 01-21-2020, 08:40 PM
RE: Help with RIGHT JOIN conversion? - by nfoboy - 01-21-2020, 09:22 PM
RE: Help with RIGHT JOIN conversion? - by nfoboy - 01-22-2020, 11:07 AM
RE: Help with RIGHT JOIN conversion? - by nfoboy - 01-22-2020, 11:08 AM
RE: Help with RIGHT JOIN conversion? - by nfoboy - 01-22-2020, 09:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB