simple way:
you can serialize your conditions array in a new field http://php.net/serialize
but beware of future DB modifications (field renaming, etc...)

On 21 août, 16:00, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I'm building a property site (trying anyway!)
>
> I've constructed my search $conditions from the data submitted in the
> search form - it gives me an array:
>
> Array ( [Letting] => Array ( [bedrooms] => 3 [price] => BETWEEN 500
> AND 600 [area_id] => Array ( [0] => 000002 [1] => 000003 ) ) )
>
> which in the SQL request gets converted by CAKE into:
>
> WHERE (`bedrooms` = 3) AND (`price` BETWEEN '500' AND '600') AND
> (`area_id` IN (000002, 000003) )
>
> but I want to offer the option for the user to save these search
> criteria so the site will email new property details to the  user
> automagically.
>
> If I split the $conditions array apart I'll need to save four or more
> separate rows and build logic to reconstruct them when the time comes
> to check for new properties.
>
> Can I just grab the complete query (without running it) and cram it
> into a field?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Reply via email to