MySQL help please :) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MySQL help please :) (
/showthread.php?tid=154575)
MySQL help please :) -
SiJ - 14.06.2010
Hello,
I started using MySQL plugin (
http://forum.sa-mp.com/index.php?topic=79352.0) but I don't know how to print to console all player names?
Here is the code to count all players:
pawn Код:
public OnGameModeInit()
{
mysql_query("SELECT * FROM `user`",99);
//...
}
public OnQueryFinish(query[], resultid, extraid, connectionHandle)
{
new string[128];
switch(resultid)
{
case 99: {
mysql_store_result();
printf("Total Members: %i",mysql_num_rows()); // I need to change this line.. but what function to use?
}
}
return 1;
}
Re: MySQL help please :) -
GTA_Rules - 14.06.2010
I guess mysql_fetch_int();
Re: MySQL help please :) -
SiJ - 14.06.2010
Quote:
|
Originally Posted by Matthias_
I guess mysql_fetch_int();
|
isn't ..._int() for integers? :S
Re: MySQL help please :) -
SiJ - 14.06.2010
bupt..