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

[eluser]jedd[/eluser]
[quote author="ricardino" date="1251915192"]Thanks for the help. So im right in understanding that the line $res->result() returns an object? so accessing it (if theres anything in it) would be a case of $object->attribute? how would i check if something is actually object, is there isobject function?[/quote]

You don't really care if it's an object, so much as whether your query returned any rows. Hence the num_rows() function and suggestion.

I never use objects as return, btw, instead using the result_array and row_array functions .. but I'm old school Wink


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