How to fix error: count(): Parameter must be an array or an object that implements Co |
A PHP Error was encountered Severity: Warning
Message: count(): Parameter must be an array or an object that implements Countable
Filename: models/login_model.php
Line Number: 17
Backtrace:
File: C:\xampp\htdocs\labexercise007\application\models\login_model.php Line: 17 Function: _error_handler
File: C:\xampp\htdocs\labexercise007\application\controllers\login.php Line: 31 Function: login
File: C:\xampp\htdocs\labexercise007\application\controllers\login.php Line: 14 Function: runBelow code is my model and controller. Code: <?php
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()); But your running CodeIgniter 3 which has the num_rows() method for MySQLi PHP Code: echo $query->num_rows(); 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 |