MySQL 2.1.1 [Multiple Rows in one Query]
#6

Quote:
Originally Posted by SKAzini
Посмотреть сообщение
Are you looking for this?

pawn Код:
new string[500];
format(string, sizeof(string), "SELECT * FROM users WHERE Name = '%s'", UserStats[playerid][Name]);
mysql_query(string);
mysql_store_result();
                   
while (mysql_retrieve_row())
{
    mysql_fetch_field_row(string, "Password");
    format(UserStats[playerid][Password], 129, "%s", string);

    mysql_fetch_field_row(string, "Admin");
    UserStats[playerid][Admin] = strval(string);
                       
    mysql_fetch_field_row(string, "Kills");
    UserStats[playerid][Kills] = strval(string);
                       
    mysql_fetch_field_row(string, "Deaths");
    UserStats[playerid][Deaths] = strval(string);
}
mysql_free_result();
If this is what you're searching for, take a while to look through the code I gave you, eventually you will understand how it works.
Thanks, I can work with BlueGz r6.
Reply


Messages In This Thread
MySQL 2.1.1 [Multiple Rows in one Query] - by Dubya - 27.02.2014, 02:38
Re: MySQL 2.1.1 [Multiple Rows in one Query] - by Dubya - 27.02.2014, 03:31
Re: MySQL 2.1.1 [Multiple Rows in one Query] - by Dubya - 27.02.2014, 16:31
Re: MySQL 2.1.1 [Multiple Rows in one Query] - by Misiur - 27.02.2014, 16:46
Re: MySQL 2.1.1 [Multiple Rows in one Query] - by SKAzini - 27.02.2014, 16:49
Re: MySQL 2.1.1 [Multiple Rows in one Query] - by Dubya - 27.02.2014, 20:50

Forum Jump:


Users browsing this thread: 1 Guest(s)