or_Where() Question - 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: or_Where() Question (/showthread.php?tid=13999) |
or_Where() Question - El Forum - 12-15-2008 [eluser]Unknown[/eluser] I need make a or_Where() query, but make a error! Code: controller I think is correct, but in the view is the problem with the: Code: view Appears: Fatal error: Call to undefined method CI_DB_mysql_driver::num_rows() And if i remove the test with num_rows() apears another error, but this time with result() Sorry for my poor English or_Where() Question - El Forum - 12-15-2008 [eluser]gstjohn[/eluser] I don't believe you are querying correctly. I think you want the following: Code: $this->db->where('name',$_POST['search']); or_Where() Question - El Forum - 12-15-2008 [eluser]gstjohn[/eluser] Sorry for the double post. If your view, you can then just check the length of your $people array with count(). Code: <?php if (count($people) > 0) : ?> or_Where() Question - El Forum - 12-16-2008 [eluser]Unknown[/eluser] Thanks. I saw the error after Thank you very much |