Bug #17639 SQl Error
Submitted: 22 Feb 2006 8:42 Modified: 22 Mar 2006 9:11
Reporter: Devendra Chipte Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version: OS:
Assigned to: CPU Architecture:Any

[22 Feb 2006 8:42] Devendra Chipte
Description:
Hi there,
I have been using PHP and mysql since last 5 years I have never got this problem, I am just trying to execute a simple query that is 

insert into (srno, userid, userpassword, access, dept, mailid) values 
('', 'test', 'rest', 'User123', 'Labs', 'test@rest.com')

but it gives me an error it says:

#1064 - 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 '(srno, userid, userpassword, access, dept, mailid) values ('', 'test', 'rest', '' at line 1 

you can check my table structure: It's very simple.
http://dit.net/printscreen.gif

for your reference here are my server details:

Php                             4.3.9
Phpmyadmin                 2.6.1.pl3
Mysql                         4.1.7
Apache                    2.0.52

If you can give me any sort of advice or help in this regard, i'd be able to go further with this. I've been stuck at this point for the last week or so, and it's been very frustrating to say the least. Please spare a moment and help a brother out. 

Sincerely, 
Devendra

How to repeat:
it has been repeating continously
[22 Feb 2006 9:11] Valeriy Kravchuk
Thank you for a problem report. Looking at your SQL statement:

insert into (srno, userid, userpassword, access, dept, mailid) values 
('', 'test', 'rest', 'User123', 'Labs', 'test@rest.com')

it is easy to find that you do not specify the table you are inserting into. Please, read the manual (http://dev.mysql.com/doc/refman/4.1/en/insert.html) and check again. The syntax above could not work in any version of MySQL.
[23 Mar 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".