> I need the value to be converted as the query returns results to the
> model.  I cant convert after the fact
> because an association query is run immediately after the initial
> query.

Hmm - is there a mysql function you can use as a field? If you can,
you could use 
http://nuts-and-bolts-of-cakephp.com/2008/09/29/dealing-with-calculated-fields-in-cakephps-find/
perhaps.

If you can stomach upgrading to cake 1.3, you could use the new
Virtual Fields functionality
http://book.cakephp.org/view/1610/Using-virtual-fields

hth

Jon

>
> On Aug 25, 9:06 am, Jon Bennett <jmbenn...@gmail.com> wrote:
>> > I have a column defined as a varbinary() field.  I need to convert the
>> > data returned from the query to hex before its applied to the model.
>> > The resulting data is being used in a second query to pull related
>> > datasets. I have added a column type hex to the db_mysql.php columns
>> > array and each varbinary() field is recognized as that type.  What
>> > function do i need to look at/change to accomplish this?
>>
>> perhaps you could wrap this up into a single method, looping over it
>> in an afterFind (or just on the results) before running the second
>> query?
>>
>> J
>>
>> --
>> jon bennett -www.jben.net- blog.jben.net
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
>



-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to