sharks_sri — 2012-07-07T11:56:57-04:00 — #1
I've been trying to do this query (this is the result of echo statement of a query) and all fields & table exist. Yet, I do not know why I get this error. PHP & MySQL.
UPDATE monsterdata SET name = 'Sharks', type1 = 'earth', type2 = 'earth',Grade = 'B', hp=7,atk=2,def=3,spd=3,int=5,exp=20,evolvelvl=20,evolvesto=2,credits=15,evolutionlvl=1,maleratio=1,IsReleased=1,IsTokenOnly=0,IsStarter=0 WHERE id = 1
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 'int=5,exp=20,evolvelvl=20,evolvesto=2,credits=15,evolutionlvl=1,maleratio='1',Is' at line 1[/I]
guido2004 — 2012-07-07T12:16:04-04:00 — #2
INT is a reserved word. Change the name of that column, or put it between backticks.
sharks_sri — 2012-07-08T01:10:03-04:00 — #3
thanks man, I have no idea why I didn't see that. Fixed! Thanks a lot!
we24support — 2012-07-10T02:56:29-04:00 — #4
INT is a preserved data type so u can 't use it as a variable and also put semicolon (;) in the end.
r937 — 2012-07-10T06:49:51-04:00 — #5
preserved?? that's an interesting way of saying don't use INT as a column name
which has already been said
that's totally optional, and has nothing to do with the posted error