27.03.2018, 01:35
Hello, I have a problem with the subject of checking data, that is, I do not get it right as I take the data from the tables, here I leave my script
Let's say that it takes data from the players table, but I do not know how to select what I want, here I have two questions to use
or this
here you can see so that you took the data from the tables
They could tell me that MYSQL's function is convenient for me to use or the error I make, it is to extract the data, as to inform me not to give value to something of the player.
PHP код:
format(Query, sizeof(Query), "SELECT * FROM players WHERE nombre='%s'", NOMBRE);
mysql_query(Query); // No query line
mysql_free_result();
if(mysql_num_rows())
{
new
apc[50],
string[215],
savingstring[256],
anickc[30],
plakc[45];
Let's say that it takes data from the players table, but I do not know how to select what I want, here I have two questions to use
PHP код:
mysql_fetch_field_row(apc, "apple");
mysql_fetch_field_row(anickc, "nickplaq");
mysql_fetch_field_row(plakc, "plakic");
PHP код:
mysql_fetch_field_row(savingstring, "apple"); apc = strval(savingstring);
mysql_fetch_field_row(savingstring, "nickplaq"); anickc = strval(savingstring);
mysql_fetch_field_row(savingstring, "plakic"); plakc = strval(savingstring);
PHP код:
format(string, sizeof string, "PLAYER: %s", NOMBRE);
SendClientMessage(playerid, -1, string);
format(string, sizeof string, "APPLE: %s - ANICKC: %s - PLAKC: %s", apc, anickc, plakc);
SendClientMessage(playerid, -1, string);