CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 update error

Print topic Send  topic

Author Message
AndreSch

Posts: 27
Posted: 06/22/2008, 8:30 AM

I have a leave table with
employee_id, date_from, date_to, leave_type_id, days.
the employee_id links to the employee table, same with leave_type_id, links to leave_type table.
days is integer and date_from and date_to is defined as date.

I used the Record builder and used lookups for employee_is and leave_types. when entering the data, I keep on getting this error:

Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'leave (employee_id, date_from, date_to, leavetype_id, days) VALUES(1, '2008-06-2' at line 1
View profile  Send private message
wkempees


Posts: 1679
Posted: 06/22/2008, 4:37 PM

Show us the SQL.
Is it handwritten code, or does it have handwritten events to it?
At first glance the data you feed to date_from is not in SQL date format.
'2008-06-2' should be '2008-06-02'

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
datadoit
Posted: 06/22/2008, 6:36 PM

LEAVE is an SQL statement. May be an issue there.
AndreSch

Posts: 27
Posted: 06/22/2008, 10:16 PM

I have fixed this problem, by renaming the table. Apparently leave is a reserved word in mysql. Once I renamed the table and recreated the form, it worked.

Thanks again for responding!
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.