The good news:
I was able to get it working (thanks!)
The bad news:
I'm now trying to append a LIKE condition, and I'm not appending
the conditions array correctly. Every time I attempt to append the
LIKE condition, it overwrites anything previously appended to the
array, as well as does some other funky stuff.
************************************************************
$formSchools = $this->data['schools'];
$conditions = array();
if(!empty($formSchools['zip_mail']))
$conditions['School.zip_mail'] = $formSchools['zip_mail'];
if(!empty($formSchools['name']))
$conditions = "School.name LIKE '%{$formSchools['name']}%'";
if(!empty($formSchools['street_mail']))
$conditions['School.street_mail'] = $formSchools['street_mail'];
if(!empty($formSchools['state_province'])
$conditions['School.state_mail'] = $formSchools['state_province'];
************************************************************
I've tried a few different ways, but still not achieving the correct
array structure.
So basically my question, How do you append a LIKE condition into the
$conditions array?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---