Welcome Guest, Not a member yet? Register   Sign In
How do you pass a model variable to a controller
#5

[eluser]CroNiX[/eluser]
Code:
$data['num_rows'] = $query->num_rows();
$data['val'] = $query->result_array();

return $data;

or, you could always just count($val) in your controller using your existing code.


Messages In This Thread
How do you pass a model variable to a controller - by El Forum - 08-19-2012, 03:14 PM
How do you pass a model variable to a controller - by El Forum - 08-19-2012, 03:20 PM
How do you pass a model variable to a controller - by El Forum - 08-19-2012, 03:21 PM
How do you pass a model variable to a controller - by El Forum - 08-19-2012, 03:23 PM
How do you pass a model variable to a controller - by El Forum - 08-19-2012, 05:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB