![]() |
problem in getting result from model. - 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: problem in getting result from model. (/showthread.php?tid=52286) |
problem in getting result from model. - El Forum - 06-05-2012 [eluser]Ram Krishna[/eluser] i am developing admin panel.In which i am developing admin login. the code is below... controller code Code: <?php Code: <?php view Code: <div class="admin_login"> please give me a solution. problem in getting result from model. - El Forum - 06-05-2012 [eluser]dnc[/eluser] Try putting Code: echo $this->db->last_query(); After Code: $query = $this->db->get('admin'); to see what the query is that you are sending to the database. problem in getting result from model. - El Forum - 06-05-2012 [eluser]Chathuranga Tennakoon[/eluser] make sure that you have loaded the DB model inside your controller. it is a good practice to autolod the database in you application configuration files. problem in getting result from model. - El Forum - 06-05-2012 [eluser]boltsabre[/eluser] >> it is a good practice to autolod the database in you application configuration files. That's not true, it completely depends on the application. If Ram has an huge website, but only a small admin panel area (perhaps it's a cms site?) and the admin panel is the only place you need a DB connection why would you autoload it cross the whole site? In this case it would make much more sense to just load it in the admin constructor. Anyway, if he didn't have a DB connection there would be a pretty obvious error message! Same if the model wan't being loaded! problem in getting result from model. - El Forum - 06-05-2012 [eluser]boltsabre[/eluser] Are the passwords in the DB hashed? If so they won't match your user input password unless you hash them as well... |