Welcome Guest, Not a member yet? Register   Sign In
How to solve this php error(Object of class CI_DB_mysql_result could not be converted
#4

(06-02-2015, 07:12 AM)PRichard Wrote:
(06-02-2015, 06:35 AM)karmad Wrote: You have problema     "if ($result==1)"  is array not int value, solution is:



Code:
$cant =count($result);
if ($cantt==1)
 @PRichard, did you mean to change the code in my view like this,
Code:
<?php

$cant= count($result);
        if ($cant==1)
        {
            echo "NO DATA FOUND";
        }
        else
        {?>
It still gives me the error message from line number 818 and 819. which is this lines
Code:
$list['result'] = $this->search_model->prtc_search($_POST['prtc_search']);

            $list['searchquery']=$_POST['prtc_search'];
One more thing I noticed, the query always shows all the data in my table irrespective of the search parameter is there in the database or not! what may be the problem? Thank you for the response as well
Reply


Messages In This Thread
RE: How to solve this php error(Object of class CI_DB_mysql_result could not be converted - by karmad - 06-02-2015, 07:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB