Query Table
#1

Hy,i have this code and my question is why she dont give me result? she tell me that is 0 result in db,but i know as the result are prezent in db.

Код:
new string[128];
GetPlayerName(playerid,username,sizeof(username));
format(string, sizeof(string), "SELECT * FROM users WHERE name = '%s'", username);
mysql_query(string);
mysql_store_result(query); 
new rows = mysql_num_rows(result);
Reply
#2

Check your MySQL log file for any error messages.
Reply
#3

First: what plugin version are you using? BlueG's plugins R7 and up don't support this style anymore. Second, what happens when you execute this query in another client (phpMyAdmin)?
Reply
#4

I have r5, i dont what the problem...

EDIT: I think that here is the problem

Код:
mysql_query(string);
mysql_store_result(query); 
new rows = mysql_num_rows(result);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)