Welcome Guest, Not a member yet? Register   Sign In
How to fix error: count(): Parameter must be an array or an object that implements Co
#2

If
PHP Code:
$row_count count($rs->row_array()); 

Returns null or false you will get that error.

See what is returned:

PHP Code:
echo count($rs->row_array());
exit(); 

But your running CodeIgniter 3 which has the num_rows() method for MySQLi

PHP Code:
echo $query->num_rows();
exit();

// for testing the count
if (num_rows() > 0)
{
    //

What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: How to fix error: count(): Parameter must be an array or an object that implements Co - by InsiteFX - 09-20-2020, 09:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB