db_query questions...
#1

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 ) ); ?
Reply
#2

BUMP ... Anyone?
Reply
#3

You only need to free result after you storing it.
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)