SA-MP Forums Archive
SQLite not writing to database? - 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: SQLite not writing to database? (/showthread.php?tid=344673)



SQLite not writing to database? - ReneG - 22.05.2012

I'm sure it's probably something right under my nose, but I can't figure out for the life of me.
pawn Код:
format(Query, 256, "INSERT INTO `Users` SET (`Name`, `Password`) VALUES ('%s', '%s')", DB_Escape(GetPlayerNameEx(playerid)), DB_Escape(PlayerInfo[playerid][pKey]));
db_query(Database, Query);
For some reason, the code above me is not writing the data to the database.


Re: SQLite not writing to database? - [HiC]TheKiller - 22.05.2012

Take a look at the INSERT syntax

Код:
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)
As far as I know, there is no SET in insert while using the way you want to.


Re: SQLite not writing to database? - ReneG - 22.05.2012

I knew it was something under my nose.

Thank, you. You're a lifesaver.