![]() |
Database query conflict - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17) +--- Thread: Database query conflict (/showthread.php?tid=64661) |
Database query conflict - JohnSmoh - 03-18-2016 Hello, I'm quite new to CodeIgniter and I'm having some kind of a weird issue while trying to execute consecutively two queries from the same model in my controller. Here is the code of the controller and the model : Controller: Login PHP Code: public function connection() { Model: Login_model PHP Code: class Login_model extends CI_Model { So here's the problem: From the controller, when I try to fetch the results using the function get_user_info(), an error is triggered, saying that I'm trying to call the function result() from a non-object. So I'm assuming that nothing returns from the query, or that it is not even triggered. The query is fully fonctional in MySQL, I get all the fields I want. The first function check_user_credentials() is working, but when it comes to the second one, get_user_info(), that is where the issue happens. After a while debugging this, I find out that when commenting the "$storedPassword = $this->login->check_user_credentials($mail);" line, the results from the get_user_info() function are shown. So have you ever seen something like that, do I miss something? Thank you. JohnSmoh. |