Re: cake 1.2 forms: date fields left empty => null in database?

2008-12-18 Thread Sebastian Göttschkes
Hi, thanks for your reply. The data field was set to null before. If I update a dataset and assigning the null value to a the birthday field (SET birthday=null) it works fine. So I added the following code to my controller: if(empty($this->data['Employee']['birthday'])) $this->data['Emplo

Re: cake 1.2 forms: date fields left empty => null in database?

2008-12-17 Thread Adriano Varoli Piazza
On 16 dic, 11:44, Sebastian Göttschkes wrote: > Additionally, if I add a valid birthday, it is saved correctly. When > editing the employee, I would like to get the birthday viewed in the > format dd.mm.. How can I tell cake to view the birthday like this? Ok, here's what I've done: in the

Re: cake 1.2 forms: date fields left empty => null in database?

2008-12-16 Thread Adriano Varoli Piazza
I am in the process of editing my views to get a similar effect. If you can wait a couple hours, I'll be back with an explanation. But, to whet your appetite: controlling for '-00-00' is not that different from controlling for null, seems to me. '-00-00' is the 'null value' for a date fie

AW: cake 1.2 forms: date fields left empty => null in database?

2008-12-16 Thread Liebermann, Anja Carolin
pe that helps. Be careful what format to validate! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag von Sebastian Göttschkes Gesendet: Dienstag, 16. Dezember 2008 14:45 An: CakePHP Betreff: cake 1.2 forms: date fields left empty

Re: cake 1.2 forms: date fields left empty => null in database?

2008-12-16 Thread Alexandru Ciobanu
Sebastian Göttschkes wrote: > Hi, > > i got the following problem using cakePHP 1.2 RC3: > > My Model 'Employee' has a attribute called 'birthday' (datatype: > DATE). In the add-view, I have the following code: > input('birthday',array('type'=>'text'));?> > If i left this field blank when adding a

cake 1.2 forms: date fields left empty => null in database?

2008-12-16 Thread Sebastian Göttschkes
Hi, i got the following problem using cakePHP 1.2 RC3: My Model 'Employee' has a attribute called 'birthday' (datatype: DATE). In the add-view, I have the following code: input('birthday',array('type'=>'text'));?> If i left this field blank when adding an employee, this employee has the birthday