• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to interpret code igniter record results with JSON

#2
[eluser]toopay[/eluser]
In the first place, you should returning an array instead an object. In your model
Code:
//...

/ * Turn off this
if($query->result()){
            $tree_result = $query->row();
            return $tree_result;
        }
*/

return $query->result() ? $query->result_array() : array();

//...


Messages In This Thread
how to interpret code igniter record results with JSON - by El Forum - 06-01-2011, 09:49 AM
how to interpret code igniter record results with JSON - by El Forum - 06-01-2011, 11:58 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.