CodeIgniter Forums
Left outside Join in Code Igniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1)
+--- Forum: Lounge (https://forum.codeigniter.com/forumdisplay.php?fid=3)
+--- Thread: Left outside Join in Code Igniter (/showthread.php?tid=86247)



Left outside Join in Code Igniter - leusiam - 01-23-2023

So here's the question: I'm not sure how to write on code igniter; I read an article about it here, thus I want to insert my "And" statement before the where. The query works, but I'm not sure what the syntax is in code igniter. Thank you in advance for any assistance.
Code:
Select c.c_id, c.c_name, p.phone_no FROM Company AS c
LEFT OUTER JOIN Phone AS p
ON p.p_flex_id=c.c_id
AND p.g_id'='1' AND p.ct_id='3'
WHERE 1



RE: Left outside Join in Code Igniter - php_rocs - 01-23-2023

@leusiam , There are multiple ways for you to do this. What version of CI are you using?


RE: Left outside Join in Code Igniter - leusiam - 02-01-2023

(01-23-2023, 09:43 AM)php_rocs Wrote: @leusiam ,  There are multiple ways for you to do this.  What version of CI are you using?

yes can you please explain the ways and i am using 3.0.6


RE: Left outside Join in Code Igniter - php_rocs - 02-01-2023

@leusiam , Here is the documentation that will assist you... https://codeigniter.com/userguide3/database/queries.html?highlight=query#query-basics


RE: Left outside Join in Code Igniter - leusiam - 02-08-2023

Thanks you for your help