mysql_fetch_object |
[eluser]JonoB[/eluser]
I usually use a php class to create value objects for my database objects. Something like: Code: class UserVO and I then return this as follows: Code: $data = mysql_query($sql); I'm now trying to get to grips with CI and the ActiveRecord methods. I realise that I could do something like the following, buts its a bit more clunky, especially with queries that contain a lot of fields. Code: foreach ($query->result_array() as $row) So, my question: is there a way to get "class_names" (as per http://php.net/manual/en/function.mysql-...object.php) when returning data using the CI ActiveRecord methods? |
Messages In This Thread |
mysql_fetch_object - by El Forum - 08-18-2010, 04:31 AM
mysql_fetch_object - by El Forum - 08-18-2010, 07:23 AM
mysql_fetch_object - by El Forum - 08-18-2010, 08:25 AM
mysql_fetch_object - by El Forum - 08-18-2010, 10:57 AM
mysql_fetch_object - by El Forum - 08-18-2010, 11:45 AM
mysql_fetch_object - by El Forum - 08-18-2010, 01:01 PM
|