Free Noobcake for Everyone |
[eluser]Bionicjoe[/eluser]
Sorry if I am yet another clueless noob posting the same question in the wrong forum, but I'm stumped. I've been following the CI tuts on Tuts Plus to learn CI. I've taken a past lesson and swapped in my own code and now I'm stuck with: Quote:Severity: Warning Here's the code Controller Code: <?php Model Code: <?php View Code: <html> This is really similar to one of the lessons, and I've boiled down the query to be as simple as possible. Know I'm missing something obvious.
[eluser]tomcode[/eluser]
function getAll() does not always return a result, in these cases the foreach loop in the view will cause an error.
[eluser]Bionicjoe[/eluser]
Thanks tomcode, but I'm certain this query is returning a result. I should have posted that originally.
[eluser]Bionicjoe[/eluser]
Solved it now!! In my model I was returning a result(), but I needed result_array(). My query was working but the result() wouldn't accept the data. So the query would return empty, and thus the problem I was having. Now I just need to get my values out of the array. Thanks!! |
Welcome Guest, Not a member yet? Register Sign In |