Welcome Guest, Not a member yet? Register   Sign In
Noob! Accessing a variable from an array
#11

[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.
#12

[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-gui...sults.html

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

[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-gui...sults.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.




Theme © iAndrew 2016 - Forum software by © MyBB