Nazdar,

24. 2. 2007, Mariano Iglesias napisal:

> Set the value on $this->data to null for that field:

Great, it works perfectly. Thanks a lot.

if ($this->data['Waypoint']['altitude'] == '') {
   $this->data['Waypoint']['altitude'] = null;
}
$this->Waypoint->save($this->data)

Only my suggestion:
CakePHP is smart and do many things "magically".
CakePHP knows that this field is defined as DECIMAL so it can be able
do this step (replace empty value with NULL) automatically...

-- 
 Michal Bilcik


--~--~---------~--~----~------------~-------~--~----~
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