18.01.2012, 21:46
Quote:
while(mysql_fetch_row(query))
{ format(msg,sizeof(msg),"%s\n",namefound); } ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, title, msg, "Select", "Back"); Edit that to your needs. It will display all users with 'LIKE' or 'EQUAL' to the IP, and list in the dialog. Obviously you need to define all the other stuff. |
I'm trying to figure out how I would apply your given code to my script;
I'm not exactly sure what to do with while(mysql_fetch_row(query)).
Would I put the query into the brackets, or would I apply the query to a string, and put the string in there? Or does it even matter?
In any case, in trying to do this, I came up with this. Please provide some insight as to whether this is correct or not. Thanks!
pawn Код:
format(queryString, sizeof(queryString), "SELECT `playerName` FROM `playerAccounts` WHERE `playerIP` = '%s'", playerVariables[targetid][pConnectionIP]);
while(mysql_fetch_row(queryString)) {
format(string, sizeof(string), "%s", namefound);
}