Hi all, I need to pass a datetime string from a form to be stored on the database as YYYY-MM-DD hh:mm:ss (i.e. datetime format in MySQL).
I then put code to clean the $this->data array in the app_model to try to setup automatic cleaning of all saved data. What I found was that because cleanArray() cleans everything without mercy, including html encoding on everything, it encoded the hyphens in teh datetime format (not the colons though). The result was that the DB (MySQL 5.something) didnt want to store it. My solution was to hack a bit of code into the app_model to reverse this so that the full sanitize check looks like this: http://www.cakephp.org/pastes/show/eb23edaac3bd13381b467669d2bd291a I am specifically interested in the publishUp and publisDown fields, but an obvious 'to do' is to create an array of fieldnames to do this to. But - does anybody have any better solutions? Thx, ianh --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---