Help with database - 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: Help with database (
/showthread.php?tid=500529)
Help with database -
cuemur - 13.03.2014
xxxxxx
Re: Help with database -
Matess - 13.03.2014
Ofcourse you do because of this
pawn Код:
format(query,sizeof(query), "SELECT * FROM "TABLE_TOYS" WHERE Owner = '%s' LIMIT 8",sendername(playerid));//LIMIT 8... so it will find 8 rows where your nickame is
Re: Help with database -
Ruben_Alonso - 13.03.2014
Hello,
You have to limit the loop that you are doing, otherwise it will just fill the 8 slots, try to do something like
pawn Код:
new row, total;
mysql_fetch_row(row);
total = strval(row);
if(total > 0)
{
for(new x;x<total;x++)// 8 Slots
{
You don't need to create a variable but it's better.