Foreach
Closed this issue · 2 comments
dbarcinas commented
Foreach
ylorant commented
The problem is not on the framework, but on your code. The instruction return ends immediately the function, so even if your model function has a loop, it will only return one row of results. You need to use the return only after the loop, when your result array has been totally formed.
And also, you don't need to use mysql_query and mysql_fetch_array, the framework already embed them in the Model class, with Model::query($query), which returns the result as an array of objects (via mysql_fetch_object).
I think you might review a few tutorials about PHP :D
dbarcinas commented
I've figured it out already..
The use of mysql_query and mysql_fetch_array was just for testing..
Closed!