Hello guys,

I'm using $ajax->observeField in order to retrieve how many
appointments are settled for a certain day, so my controllers action
is:

        function byDay ()
        {
                $this->RequestHandler->setAjax($this);
                if(!empty($this->data))
                        $date = $this->data['Appoinment']['date'];
                else
                        $date = date('Y-m-d');
                $this->set('appointments', $this->Appointment->findCount('WHERE
Appointment.date ="' . $date . '"'));
        }


$date is passed via the observeField in my view, I get current date by
default:

<?php echo $html->input('Appoinment/date', array('value' => date('Y-m-
d'))) ?>
<?php echo $ajax->observeField('AppointmentDate', array('url'=>'/
appointments/byDay', 'frecuency' => 2, 'update' => 'appointments')) ?>

Here's everything works but the query I'm getting from cake is:

SELECT * FROM Appointments WHERE [Appointment].[date] LIKE
'%2007-06-18%'

And what I really need is a = statament:

SELECT * FROM Appointments WHERE [Appointment].[date] = '2007-06-18'

How can I change this behaviour ?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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