mysql - INSERT SQL error -
i have in script:
$db->q("insert 'keys' (key,grupo,dias) values ('$key','vip',$love);");
which generates sql this
insert 'keys' ('key','grupo','dias') values ('35f3','vip',28)
but
you have error in sql syntax; check manual corresponds mysql server version right syntax use near ''keys' ('key','grupo','dias') values ('35f3','vip',28)' @ line 1
i'm adding screenshot of table's structure: http://i.stack.imgur.com/lukfm.png
thanks ur help!
tables names identfiers not string literals. in case escape, should use backticks,
insert `keys` (`key`,`grupo`,`dias`) values ('35f3','vip',28)
Comments
Post a Comment