How do i use left join in code igniter |
[eluser]huangxiao[/eluser]
Hi, can i ask..i am still newbie on this code igniter and i am worry about how to use the left join,subquery etcc...can you please show me how to use in codeigniter. this is my pdo sqlquery how do i convert this to codeigniter sqlquery... for example like this.... Code: $db->prepare("select emp.empno,emp.firstname,jb.empno,jb.jobname please help me thannk you in advance.
[eluser]ivantcholakov[/eluser]
I work with CodeIgniter 3.0 dev, and the following code should work: Code: $query = $this->db As a result it builds the following raw query: Code: SELECT `emp`.`empno`, `emp`.`firstname`, `jb`.`jobname` It is strange to me why the field jb.empno is placed, it is repetitive, I think. I removed it. For lower version of CodeIgniter I did not test this. You may see this.
[eluser]ivantcholakov[/eluser]
Not mandatory, but useful: http://ellislab.com/codeigniter/user-gui...iling.html For development purpose you may enable the profiler, it displays useful information at the bottom of the page. I shows the generated raw queries, so you can make comparison whether they are correct. For production system disable the profiler.
[eluser]huangxiao[/eluser]
Hi Thank you for the quick reply...and thank you for helping me. |
Welcome Guest, Not a member yet? Register Sign In |