Quick help, I'm tired ;)
#1

Alright so..

pawn Код:
new Skins[];
I'm legit confused as to how I load skins from the DB (i know how to do that) and then put them in to Skins, making the variable inside [ and ] go up by 1 every time. If anybody understands what I mean, any help would be greatly appreciated.
Reply
#2

try something like this:
pawn Код:
new query[100];
format(query, sizeof(query), "mysql code.. (you know it:P)");
mysql_query(query);
mysql_store_result();
new n = mysql_num_rows();
mysql_free_result();
for(new i=0; i<n; i++)
{
  format(query, sizeof(query), "SELECT * FROM `Skins` WHERE `id`='%d'", i);
  mysql_query(query);
  mysql_store_result();
  get the id...
  Skin[i] = id;
  mysql_free_result();
}
hope that helps...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)