Mysql little explain - 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: Mysql little explain (
/showthread.php?tid=361125)
Mysql little explain -
TheDeath - 20.07.2012
Ok i fully know mysql but in samp i cant understand one how when i select some thing like
Код:
mysql_query(SELECT * FROM USER WHERE USERNAME='...some string');
So i want to ask how to save it as a new string in samp beacuse
Example:
Код:
new adminlevel[MAXPLAYERS];
so here i want to save some row from mysql in this String
Re: Mysql little explain -
namespace - 20.07.2012
use format..
Код:
format(query,sizeof query, "SELECT * FROM USER WHERE USERNAME='%s'",..some string);
mysql_query(query);
Re: Mysql little explain -
TheDeath - 20.07.2012
and then when i select it how to save it in sting

if i cant save it i cant do anything with mysql
Re: Mysql little explain -
ReneG - 20.07.2012
Look at all the mysql/sqlite tutorials on the forum. ****** is your friend. To save items in a database it's the
UPDATE clause.