SA-MP Forums Archive
Quick SQLite question - 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: Quick SQLite question (/showthread.php?tid=598805)



Quick SQLite question - Kimble - 16.01.2016

This:

Код:
format( Query, sizeof( Query ), "SELECT password FROM users WHERE username = '%s' LIMIT 0, 1", DB_Escape( User[ playerid ][ USER_NAME ] ) );
Can now (as of 0.3.7 R2) be just:

Код:
format( Query, sizeof( Query ), "SELECT password FROM users WHERE username = '%q' LIMIT 0, 1", User[ playerid ][ USER_NAME ] );
?


Re: Quick SQLite question - Karan007 - 17.01.2016

Yes, you can now use this:

pawn Код:
format( Query, sizeof( Query ), "SELECT password FROM users WHERE username = '%q' LIMIT 0, 1", User[ playerid ][ USER_NAME ] );
since the 0.3.7 version has been released. No need to use DB_Escape now use only the "%q" specifier!