Welcome Guest, Not a member yet? Register   Sign In
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



Theme © iAndrew 2016 - Forum software by © MyBB