I have such a request for php:

mysql_query("INSERT INTO pers_users (name,TypeChakra,int,dam,sp,chak,telo,def,hand_pech,nin,tay,gen,level,img,start,first,klan,login) values('$name','$TypeChakra','$int','$dam','$sp','$chak','$telo','$def','$hand_pech','$nin','$tay','$gen','1','$img','1','1','$klan','$login')")or die(mysql_error()); 

Already some time I rewrite the request, but it still does not execute, and such an error pops up:

 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,dam,sp,chak,telo,def,hand_pech,nin,tay,gen,level,img,start,first,klan,login)' at line 1 

Can you please tell me what to do with this trouble?)

    1 answer 1

    so it is impossible, you have the field name int, which is not very correct, because from the point of view of mysql int = integer, i.e. data type option 2 or change the name of the variable or read the manual to mysql and see examples of how to use the names of the fields. if you do this:

     mysql_query("INSERT INTO pers_users (`name`,`TypeChakra`,`int`,`dam`,`sp`,`chak`,`telo`,`def`,`hand_pech`,`nin`,`tay`,`gen`,`level`,`img`,`start`,`first`,`klan`,`login`) 

    then everything will work;)

    learn to program correctly!

    • Understood, thanks) - oOKomarOo