Sql query errro - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Sql query errro (
/showthread.php?tid=657819)
Sql query errro -
KinderClans - 15.08.2018
pawn Code:
mysql_tquery(g_SQL, "INSERT INTO `drugpoints`", "OnDrugPointCreated", "d", i);
What's wrong in this sql query? i'm getting syntax error.
Re: Sql query errro -
Banditul18 - 15.08.2018
https://www.w3schools.com/sql/sql_insert.asp
Re: Sql query errro -
KinderClans - 15.08.2018
Quote:
Originally Posted by Banditul18
|
Thank you but that doesn't help me. Do you mind tell me what's wrong with my query?
Re: Sql query errro -
Banditul18 - 15.08.2018
Quote:
Originally Posted by KinderClans
Thank you but that doesn't help me. Do you mind tell me what's wrong with my query?
|
If you looked on how the querry looks like in the link you would have deducted that you miss to specificy the colums to be insert to and values of that colums to be add
Re: Sql query errro -
KinderClans - 15.08.2018
I dont need to add any values. Just the OnDrugPointCreated...
Re: Sql query errro -
Banditul18 - 15.08.2018
You can always make all the colums in the that table have defaults values(so querry will not fail) and make that query acording to the corect syntax(maybe inserting a default value)
Re: Sql query errro -
KinderClans - 15.08.2018
I can't make default values since are connected to a dynamic drug point system. Can you please help me and show me how to fix this query? Thanks.
Re: Sql query errro -
KinderClans - 15.08.2018
Fixed. At the end i setup interior default value to 0.