CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 php help with dates and mysql

Print topic Send  topic

Author Message
Frank Rocco
Posted: 07/31/2002, 7:15 AM

Hello, the following line fails to insert into my mysql database.

Insert into SWCheckin
(item_id,employee_id,date_due,date_out,date_in,reason,CheckedInBy) values
(29,465,2002-7-6 4:07:56,2002-7-3 4:07:56,2002-7-31 9:07:33,'Upgrade',455)

Can someone tell me what is wrong with this?
What is the best way to handle date/time with CC 2 and mysql?

Thanks

Frank

a.. Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E09)
[TCX][MyODBC]You have an error in your SQL syntax near '4:07:56,2002-7-3
4:07:56,2002-7-31 10:07:45,'Upgrade',455)' at line 1
/is/Librarian/CheckinRecordSW.asp, line 260


a.. Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)

a.. Page:
POST 183 bytes to /is/Librarian/CheckinRecordSW.asp

a.. POST Data:
reason=Upgrade&FormAction=delete&FormName=Checkin&PK_checkout_id=78&checkout
_id=78&item_id=29&employee_id=465&date_out=7%2F3%2F2002+4%3A07%3A56+AM&date_
due=7%2F6%2F2002+4%3A07%3A56+AM


Frank Rocco
Posted: 07/31/2002, 7:22 AM

opps....
it is currently an ASP application. I was thinking of rewriting it in php.

Thanks
Frank

DonB
Posted: 07/31/2002, 6:00 PM

You have to enclose dates in apostrophes, just like you did with the
strings.


"Frank Rocco" <farocco@hotmail.com> wrote in message
news:ai8rqs$ani$1@news.codecharge.com...
> opps....
> it is currently an ASP application. I was thinking of rewriting it in php.
>
> Thanks
> Frank
>
>

Frank Rocco
Posted: 07/31/2002, 6:22 PM

Thanks DonB....

Regards,

Frank


   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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