Brian Dunning's Error Code Reference

MySQL Error 1064

SQLSTATE: 42000 (ER_PARSE_ERROR) %s near '%s' at line %d

 

Comments

Sagar   Sagar
Mar 4, 2014
SQL Error: 1064, SQLState: 42000.....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
 
nn   nn
Mar 21, 2013
Hello..
I have a problem with this code

DELETE FROM USERS_TABLE WHERE username='bob';--'

thank you
 
iram   iram
Nov 24, 2012
Error code 1064, SQL state 42000: 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 '-papers .dmatched LIMIT 20 OFFSET 0' at line 1

bt my query is correct


1 select * from 'ranked-papers'.dmatched
2 select * from `ranked-papers`.dmatched

SQL nevery show error on query 2 bt it show error on query 1 bt both queryes are same bt what difference is btween these 2

plz help me
 
derya   derya
Jul 1, 2010
I have just learned that while we constructing our data base,most of data type is array like VARCHAR(45) but if one of them is like VARCHAR,it gives this error also..
 
derya   derya
Jul 1, 2010
I think it should be :
$cons ="INSERT INTO visit(cub,dat,name) values ($cubi,$date,$nam)";

; is the problem your code.
 
Enrique Espinosa   Enrique Espinosa
Feb 26, 2010
Hi, i have a problem with the next code:
$cons ="INSERT INTO visit(cub,dat,name) values ($cubi,$date,$nam);";
$rs = mysql_query($cons);

I´m trying to fill a data base whit this variables, but it is only giving me this line:
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
with this error 1064.
my code is correct, even it works with another html.
what can i do?
 
Brian Dunning   Brian Dunning
Nov 7, 2005
It's a syntax error. You typed something wrong. Sometimes it can be frustrating as hell to find a tiny typo. Check the documentation for a clean example of your type of query.