Re: afterFind() dillemna - eats memory for breakfast

2008-01-22 Thread Flipflops
Thanks AD7six You learn something new every day. That is certainly a lot easier than a custom query! I downloaded 1.2 last week and am looking forward to trying it out. J --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: afterFind() dillemna - eats memory for breakfast

2008-01-18 Thread grigri
Whether using database functions like CONCAT(), or php code, I agree it would be nice to handle fields in a simple, easy manner. In a project a while ago I was storing a comma-delimited list in a database field [I had my reasons] and explode()ing it in afterFind. The afterFind code, to handle all

Re: afterFind() dillemna - eats memory for breakfast

2008-01-18 Thread Flipflops
Hi AD7six I like you answer - letting the database use CONCAT leaves your code nice and clean, how exactly are you suggesting to do it though? Can you append it to the model in some way when you use a built in method (e.g. findAll) or were you suggesting creating a custom query function in

Re: afterFind() dillemna - eats memory for breakfast

2008-01-18 Thread AD7six
On Jan 18, 10:16 am, Flipflops [EMAIL PROTECTED] wrote: Hi AD7six I like you answer - letting the database use CONCAT leaves your code nice and clean, how exactly are you suggesting to do it though? Add it to your field list. Can you append it to the model in some way when you use a

Re: afterFind() dillemna - eats memory for breakfast

2008-01-18 Thread the_woodsman
Remember as well you could use an SQL view to achieve things like this, making your code lots cleaner. Remember you can also dynamically change the table used by a model, so you can switch from the real table to the view for particular queries, then switch back (No idea if that's considered good

Re: afterFind() dillemna - eats memory for breakfast

2008-01-18 Thread b logica
On Jan 18, 2008 2:46 AM, AD7six [EMAIL PROTECTED] wrote: 32MB of memory is a bit stingy. Sure. But it seems to be it should be more than enough to handle 1000 records. I can bump it up but I'd like to ensure I'm not doing so unnecessarily. How about 1) delete your afterFind method 2)

Re: afterFind() dillemna - eats memory for breakfast

2008-01-17 Thread b logica
On Jan 17, 2008 9:52 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: cake 1.2.0.6311-beta, PHP 5.2.4 I'm trying to use afterFind() in order to massage some data for a model and am seeing PHP max out the memory limit (32MB). I'm only using a subset of just 1000 records (about 5%) from the

Re: afterFind() dillemna - eats memory for breakfast

2008-01-17 Thread AD7six
On Jan 18, 3:52 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: cake 1.2.0.6311-beta, PHP 5.2.4 I'm trying to use afterFind() in order to massage some data for a model and am seeing PHP max out the memory limit (32MB). I'm only using a subset of just 1000 records (about 5%) from the prod.