CodeIgniter Forums
Noob! Accessing a variable from an array - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Noob! Accessing a variable from an array (/showthread.php?tid=29452)

Pages: 1 2


Noob! Accessing a variable from an array - El Forum - 04-10-2010

[eluser]trickymh[/eluser]
John, Adam, thanks again for your help!

Looking at the changes it seems:

Code:
return $query->row();

made the difference - I wasn't using the ->row(); on the return before.


Noob! Accessing a variable from an array - El Forum - 04-10-2010

[eluser]John_Betong[/eluser]
'glad I was able to help.

Play around with different Active Record variations - the User Guide is very good with umpteen examples.

I nicked the example from : http://ellislab.com/codeigniter/user-guide/database/results.html

The CodeIgniter Active Record is a bit convoluted but well worth studying. Always best to start with something that works and make variations.
 
 
 


Noob! Accessing a variable from an array - El Forum - 04-10-2010

[eluser]trickymh[/eluser]
[quote author="John_Betong" date="1270921627"]'glad I was able to help.

Play around with different Active Record variations - the User Guide is very good with umpteen examples.

I nicked the example from : http://ellislab.com/codeigniter/user-guide/database/results.html

The CodeIgniter Active Record is a bit convoluted but well worth studying. Always best to start with something that works and make variations.
 
 
 [/quote]

Oh my god, it's all in there isn't it! I've had the user guide open for the last two days now and for whatever reason never came across that page. The user guide is great though. I think what was confusing me was the fact it worked with a foreach and not without. Anyway, all part of the learning process.