Re: [CDBI] How do you get the raw db value of a column rather than inflated object

[prev] [thread] [next] [Date index for 2006/02/11]

From: Michael Peters
Subject: Re: [CDBI] How do you get the raw db value of a column rather than inflated object
Date: 17:56 on 11 Feb 2006

Bill Moseley wrote:
> On Sat, Feb 11, 2006 at 06:57:32AM -0600, Peter Speltz wrote:
> 
>>I want the value in my has_a column and not the object.  How do i do this.
> 
> 
>     $object->my_column->id

The downside to this approach is that if you just want the id (which you already
 know since it's a column in $object's table) you can't juse use it. You have to
create a second object (which may require a trip to the database). In a tight
loop, this could cause some performance problems.

        -- 
        Michael Peters
Developer
Plus Three, LP


_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

Re: [CDBI] How do you get the raw db value of a column rather than inflated object
Michael Peters 17:56 on 11 Feb 2006

Generated at 10:41 on 18 Feb 2006 by mariachi v0.52