0

I keep getting the following error:

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 '' at line 1

when I try to run this query in phpMyAdmin:

INSERT INTO access_log ( 
  idStaff, validSession, attempts, remoteHost, remoteAddress, remoteTime, banned,
  errorNumber,errorMessage,userName ) 
VALUES ( '1','1','1','voidDNS','188.25.3.105','1388877754','','','','pinochio';

My table has these columns and their type in this order is (except an auto-increment column 'entry"):

INT, TINYINT, INT, TEXT, VARCHAR(20), BIGINT( I was afraid of using TIMESTAMP), TINYINT, INT, TEXT, VARCHAR(24).

The query is generated by php automatically, this is why every value has quotes, which I understand shouldn't generate an error.

Can anyone see what's wrong here?

1
  • It's amazing what a little formatting will do. You're lacking a closing parenthesis on your VALUES clause. Commented Jan 5, 2014 at 0:55

1 Answer 1

1

Lack simply closing parentheses at the end of query

Sign up to request clarification or add additional context in comments.

3 Comments

I think you mean closing bracket/parentheses
There are two main problems here: 1. I shouldn't work till 3 o'clock at night. 2. Thanks a lot you didn't get me banned for such a stupid question! If it wasn't a webpage you could have heard the sound of my hand when I hit my front head! Thanks again. I lost 3 hours, for this stupid closing parentheses!
These things happen. What you can do is shut down or hibernate your pc and then rest your mind a bit and then you're well relaxed try again. Have stayed a whole day behind a semicolon in php. All it takes is learning to stop when saturate and then return. ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.