saving with loop mysql +Rep
#1

how is it possible to save something in a file using a loop,instead of putting them all i wanna put like item1 = pinfo[playerid][pitem][0],like this..
Reply
#2

PHP код:
For(new i=0;!=MAX_PLAYERS -1;i++)
{
      
item[i+1][playerid] =   pinfo[playerid][pitem][i+1];

PHP код:
new item[MAX_item][MAX_PLAYERS]; 
Reply
#3

i meant inserting them to the table
Reply
#4

PHP код:
new dbHandle,query;
    
mysql_format(dbHandlequerysizeof(query), "UPDATE `Users` SET `item`='%i',pinfo[playerid][pitem][i+1]);
mysql_tquery(dbHandle, query, "", ""); 
change Users by your db table name and make sur you have item table created
Reply
#5

i said 'insert' not 'update',come on.
Reply
#6

Anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)