Welcome Guest, Not a member yet? Register   Sign In
How do i convert this?
#1

How do i get this working i receive this error 
Quote:Cannot use object of type stdClass as array
with the below snippet the issue seems to be with the foreach. 

Code:
$result = $zgrid->query("SELECT * FROM parcels WHERE $category " .
            "(parcelname LIKE '%$text%'" .
            " OR description LIKE '%$text%')" .
            $type . " ORDER BY $order parcelname" .
            " LIMIT ".(0+$query_start).",101");

    $data = array();
    foreach($result->result() as $row ){
        $data[] = array(
                "parcel_id" => $row["infouuid"],
                "name" => $row["parcelname"],
                "for_sale" => "False",
                "auction" => "False",
                "dwell" => $row["dwell"]);
    }
Reply


Messages In This Thread
How do i convert this? - by littlefeather - 03-10-2016, 02:38 PM
RE: How do i convert this? - by acsv - 03-10-2016, 03:01 PM
RE: How do i convert this? - by cartalot - 03-10-2016, 05:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB