Welcome Guest, Not a member yet? Register   Sign In
Create a custom object from DB result()?
#2

[eluser]Matt S.[/eluser]
Are you wanting a custom object for each actual row or for each fieldset returned? You can try to make a custom reference of each object, like so:

Code:
foreach($query->result() as $row)
{
     $row->someField    =& $custom1->someField;
     $row->anotherField =& $custom2->anotherField;
}

I'm still a little confused on what you are trying to accomplish.


Messages In This Thread
Create a custom object from DB result()? - by El Forum - 11-27-2010, 09:48 AM
Create a custom object from DB result()? - by El Forum - 11-27-2010, 10:38 AM
Create a custom object from DB result()? - by El Forum - 11-27-2010, 02:28 PM
Create a custom object from DB result()? - by El Forum - 11-27-2010, 02:55 PM
Create a custom object from DB result()? - by El Forum - 11-27-2010, 05:13 PM
Create a custom object from DB result()? - by El Forum - 11-27-2010, 05:43 PM
Create a custom object from DB result()? - by El Forum - 12-02-2010, 05:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB