Welcome Guest, Not a member yet? Register   Sign In
Simple question i guess... need help using the db class!
#4

[eluser]CroNiX[/eluser]
Also your original problem was because you used:
Code:
foreach ($q->result as $row) {
instead of
Code:
foreach ($q->result() as $row) {  //result() is a method, not a property.
That's why you got "undefined property" and it never entered the loop, which made $resultarray undefined as it never got created (but you return it anyway). You should create the $resultarray array (empty) just before the foreach loop where you populate it to prevent that.


Messages In This Thread
Simple question i guess... need help using the db class! - by El Forum - 05-03-2012, 09:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB