Just to clarify mike's point: in your controller:
$conditions = array("Property.zip" => $this->data); should be: $conditions = array("Property.zip" => $this->data['Property'] ['zip']); On Aug 26, 10:15 pm, mike karthauser <mi...@brightstorm.co.uk> wrote: > hi > you should turn on debug=2 and have a look at your query. i suspect you > aren't returning the value you want to return any data. > > have you pr($this->data) within your controller action? i suspect your > > echo $form->input('Zip Code'); field is better named as > > echo $form->input('zip', array(label'=>'Zip Code'));which will give you > $this->data['Property']['zip'] with a value > > when you post > > HTH > > > > bumper wrote: > > I'm brand new to cake so please be gentle .... > > > My view look like the following : > > > <div id="property"> > > <?php > > echo $form->create('property', array('action' => 'findzip')); > > echo $form->input('Zip Code'); > > echo $form->submit(); > > echo $form->end(); > > ?> > > </div> > > > <?php foreach ($foundProperties as $property): ?> > > > <?php echo $this->element('property', array('property' => > > $property)); ?> > > > <?php endforeach; ?> > > > my function in the controller looks like : > > > function findzip() > > { > > > if (!empty($this->data)) { > > > $conditions = array("Property.zip" => $this->data); > > $foundProperties = $this->Property->findall > > ($conditions); > > $this->set(compact('foundProperties'));} > > > } > > > all I want to do is return the properties that have the zip code sent > > by the form. I've been working on it for > > two days and I'm at my wits end. > > > Rich --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---