I have an ajax actions that saves a model into the db and returns an
xml response to the script.
After some modifications I wrongly tried to save in a mysql date field
a string wrongly formatted.
This way I have noticed that doing the usual

if($this->model->save()) {
success_stuff()
}{
failure_stuff()
}

returns true (executes success_stuff() ) even if the resulting page
returns (rightfully) the following warning

Warning (512): SQL Error: 1292: Incorrect date value: '10/12/2009' for
column 'dateto' at row 1

Someone else noticed this ? I don't know if it's worth mentioning that
i'm using innoDB tables and the failing query is in a transaction.
Should not have if($this->model->save()) {...} executed failure_stuff
() instead ?


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

Reply via email to