lulazz
Posts: 29
|
| Posted: 10/08/2007, 5:06 AM |
|
Hi,
I have a form to insert aa record in a Mysql DB
I have 2 date fields, one that is chosen with a datepicker and the other one is a readonly text box which default value is currentdate.
Both fields show the right date but when I try to insert them in the db the one with the date picker is fine while the other is 0000-00-00.
Both date have the same formats dd/mm/yyyy for visualisation and yyyy-mm-dd HH:nn:ss as dbformat
Can you please help me on this?
Tanks
Lulazz
|
 |
 |
datadoit
|
| Posted: 10/08/2007, 5:21 AM |
|
lulazz wrote:
> Hi,
> I have a form to insert aa record in a Mysql DB
> I have 2 date fields, one that is chosen with a datepicker and the other one is
> a readonly text box which default value is currentdate.
> Both fields show the right date but when I try to insert them in the db the one
> with the date picker is fine while the other is 0000-00-00.
> Both date have the same formats dd/mm/yyyy for visualisation and yyyy-mm-dd
> HH:nn:ss as dbformat
> Can you please help me on this?
> Tanks
> Lulazz
>
>
> ---------------------------------------
'Readonly' won't insert or update data. You need to add a hidden field
with the date.
|
|
|
 |
Waspman
Posts: 948
|
| Posted: 10/08/2007, 5:22 AM |
|
It's probably cos it's read only, try it.
Perhaps you could hide it?
Tony
_________________
http://www.waspmedia.co.uk |
 |
 |
lulazz
Posts: 29
|
| Posted: 10/08/2007, 5:43 AM |
|
quite strange.....
I removed the read only attribute and I added a date picker as well (and removed the default value) but still no luck
the date is inserted as 000-00-00
the strange thing is that if I modify the date it gets updated correctly
I think I will try from beginning
|
 |
 |
lulazz
Posts: 29
|
| Posted: 10/08/2007, 7:33 AM |
|
problem solved....
by mistake I deleted the value to be inserted in the insert_row
Thanks
|
 |
 |