A better way of doing this query?
#1

Is there a better way of doing this query?

pawn Код:
mysql_format(Connection, Query, sizeof Query, "SELECT `name` FROM `characters` WHERE `id` = %d LIMIT 1", MasterAccounts[playerid][maCharacter][0]);
mysql_function_query(Connection, Query, true, "SelectCharacterNames", "d", playerid);

mysql_format(Connection, Query, sizeof Query, "SELECT `name` FROM `characters` WHERE `id` = %d LIMIT 1", MasterAccounts[playerid][maCharacter][1]);
mysql_function_query(Connection, Query, true, "SelectCharacterNames", "d", playerid);

mysql_format(Connection, Query, sizeof Query, "SELECT `name` FROM `characters` WHERE `id` = %d LIMIT 1", MasterAccounts[playerid][maCharacter][2]);
mysql_function_query(Connection, Query, true, "SelectCharacterNames", "d", playerid);

mysql_format(Connection, Query, sizeof Query, "SELECT `name` FROM `characters` WHERE `id` = %d LIMIT 1", MasterAccounts[playerid][maCharacter][3]);
mysql_function_query(Connection, Query, true, "SelectCharacterNames", "d", playerid);
What I am doing is selecting the character name for four slots where the master account id matches.
Reply


Messages In This Thread
A better way of doing this query? - by arko123 - 12.08.2014, 14:42
Re: A better way of doing this query? - by Misiur - 12.08.2014, 14:49
Re: A better way of doing this query? - by arko123 - 12.08.2014, 14:58
Re: A better way of doing this query? - by arko123 - 13.08.2014, 19:02

Forum Jump:


Users browsing this thread: 1 Guest(s)