[eluser]toopay[/eluser]
Code:
return (count($result) >0 ? $result[0] :NULL);
that means, if the result more than 0, the function return first row matched
if not, it returns NULL. For an array result, you can just simply change
to
at the end of your model function, and write the rest proper code at your controller to handle that array.