CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Problem insering a date (currentdate) in mysql

Print topic Send  topic

Author Message
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

View profile  Send private message
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
View profile  Send private message
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

View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.