Having issues with a database query in codeigniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Having issues with a database query in codeigniter (/showthread.php?tid=52986) |
Having issues with a database query in codeigniter - El Forum - 07-05-2012 [eluser]reghan[/eluser] Hello, I am having issues writing a db query in my model. here is the query I am trying to write: Code: SELECT SystemName, process.ProcessId, RTO I tested the above SQl statement and it worked. I would like to have DepartmentId = 8 and ProcessId = 2 passed in as variables, so here is what I wrote in the model. Code: function getSysPro($dep, $pro) I am not getting any values returned, so I am not sure what the problem is. if anyone could provide assistance that would be great! Thanks!! Having issues with a database query in codeigniter - El Forum - 07-05-2012 [eluser]Aken[/eluser] Use $this->db->last_query() to see what is actually being queried, and see where the problem is. |