[SOLVED] Num_rows() returns error message |
My application is using the sqlsrv database driver.
In many queries, the $query->num_rows() function throws an error: Code: fatal error: call to a member function num_rows() on boolean Even if I use the $this->db->list_tables() function, I get this terrible error, but I'm sure may database contains several tables. Any tips how to solve this?
10-19-2017, 08:43 AM
(This post was last modified: 10-19-2017, 08:43 AM by Narf. Edit Reason: formatting ) (10-19-2017, 08:43 AM)Narf Wrote:(10-19-2017, 07:33 AM)Wouter60 Wrote: fatal error: call to a member function num_rows() on boolean I know, but how can $this->db->list_tables() cause this error? In MySQL, I've never seen this error. There, I can check for $query->num_rows() == 0); This doesn't seem to work in MSSQL (Windows Server).
Try doing a var_dump or print_r of the $query to see what is happening,
Or echo it to the screen you should see where the error is. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |