Welcome Guest, Not a member yet? Register   Sign In
$query->num_rows(); can not get the number of rows
#5

[eluser]Jondolar[/eluser]
Why are you calling $query->num_rows();

You are using an ActiveRecord call that returns an array. You have no object to call num_rows() against.

If you want to continue to use ActiveRecord you need to call:
$this->db->count_all('my_table');

Basically, you are mixing ActiveRecord functions with the database class functions


Messages In This Thread
$query->num_rows(); can not get the number of rows - by El Forum - 05-11-2009, 09:06 AM
$query->num_rows(); can not get the number of rows - by El Forum - 05-11-2009, 09:19 AM
$query->num_rows(); can not get the number of rows - by El Forum - 05-11-2009, 08:47 PM
$query->num_rows(); can not get the number of rows - by El Forum - 05-15-2009, 12:13 PM
$query->num_rows(); can not get the number of rows - by El Forum - 05-15-2009, 03:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB