• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.