db_query questions... - 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: db_query questions... (
/showthread.php?tid=323459)
db_query questions... -
Edvin - 05.03.2012
I started to change my gamemode from dini to SQLite ... I seen much gamemodes and filterscript that uses SQLite ... and i saw: db_free_result( db_query( Database, Query ) ); ... on other i saw just: db_query. And my question is:
If i want to do a simple command, for exemple:
pawn Код:
CMD:command( playerid, params[ ] )
{
new query[ 256 ];
format( query, sizeof( query ), "UPDATE `Database` SET `Exemple` = '%d' WHERE `Name` = '%s'", PlayerName( playerid ) );
db_query( Database, query );
//or db_free_result( db_query( Database, query ) ); ?
//or is the same thing? :))
return 1;
It is better with db_query( Database, query ); , not with db_free_result( db_query( Database, query ) ); ?
Re: db_query questions... -
Edvin - 06.03.2012
BUMP ... Anyone?
Re: db_query questions... - T0pAz - 06.03.2012
You only need to free result after you storing it.
Re: db_query questions... -
Mark™ - 06.03.2012
Not sure about what your upto but this will help you, if your changing your gm from ini to sqlite :
https://sampwiki.blast.hk/wiki/SQLite