Welcome Guest, Not a member yet? Register   Sign In
accessing data in a controller
#1

[eluser]richzilla[/eluser]
Hi all, just a bit of a question regarding data access. Im having trouble accessing returned data in a controller, im sure im just missing something very obvious but i cant see it at all.

if i return data from my model to my controller as follows:

Code:
return $query->result();

Does that mean that i can access the data in the controller as follows:

Code:
$variable = $whatever-the-model-returned;
$variable->db_col;

so far all ive done is pass data straight to a view, where it goes as an array, but model appears to return an object, however im now starting to do my own apps an im getting a bit confused by this. Any help would be appreciated, just to straighten things out for me.
cheers


Messages In This Thread
accessing data in a controller - by El Forum - 09-02-2009, 04:13 AM
accessing data in a controller - by El Forum - 09-02-2009, 04:26 AM
accessing data in a controller - by El Forum - 09-02-2009, 06:56 AM
accessing data in a controller - by El Forum - 09-02-2009, 07:05 AM
accessing data in a controller - by El Forum - 09-02-2009, 07:10 AM
accessing data in a controller - by El Forum - 09-02-2009, 07:13 AM
accessing data in a controller - by El Forum - 09-02-2009, 07:20 AM
accessing data in a controller - by El Forum - 09-02-2009, 07:22 AM
accessing data in a controller - by El Forum - 09-02-2009, 07:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB