How do i convert this? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: How do i convert this? (/showthread.php?tid=64598) |
How do i convert this? - littlefeather - 03-10-2016 How do i get this working i receive this error Quote:Cannot use object of type stdClass as arraywith the below snippet the issue seems to be with the foreach. Code: $result = $zgrid->query("SELECT * FROM parcels WHERE $category " . RE: How do i convert this? - acsv - 03-10-2016 Try "parcel_id"=> $row->infouuid (ie reference it as an object, not an array. I'm just guessing here. RE: How do i convert this? - cartalot - 03-10-2016 this returns an object PHP Code: $result->result() this returns an array PHP Code: $result->result_array() http://www.codeigniter.com/user_guide/database/results.html |