22.08.2010, 23:52
(
Последний раз редактировалось Simon; 23.08.2010 в 00:01.
Причина: Added some code etc
)
I use SQLite (concepts are the same) so I may not be the best person to write the 'working' code, only confident with the theory side. However I will see what I can do.
After seeing your edit it appears that you're using the strtok incorrectly.
edit: Jeepers, that strtok is scary.. you should be able to use samp_mysql_get_field which would be a lot easier for you and probably more efficient.
After seeing your edit it appears that you're using the strtok incorrectly.
edit: Jeepers, that strtok is scary.. you should be able to use samp_mysql_get_field which would be a lot easier for you and probably more efficient.
pawn Код:
format(query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%s' LIMIT 1", "14aa41");
samp_mysql_query(query);
samp_mysql_store_result();
samp_mysql_fetch_row(Data);
// Here's the pudding, try this instead of strtok and loop :p
new
intBuf[64];
samp_mysql_get_field("<enter_the_name_of_admin_level_field_here>", intBuf);
print("The admin level is %d", strval(intBuf));