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
|
 |
 |
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
|
 |
 |
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!
|
 |
 |
|