29.06.2012, 22:18
Hello,
I'm using last version (R7) of BlueG's MySQL plugin but im experiencing some errors:
I'm do de connection to database onGameModeInit with this function:
After this When Player Do Login i'm doing this:
My Table User have one entry, and When i make this Query on phpmyadmin this is correct and return me one Player.
The field that i try get is password.

My console of server is return this:

Why i get NULL and 4960580 rows?
Please help
I'm using last version (R7) of BlueG's MySQL plugin but im experiencing some errors:
I'm do de connection to database onGameModeInit with this function:
Код:
forward ConnectToDatabase();
public ConnectToDatabase()
{
mgDBHandle=mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
if(mysql_ping() == 1)
{
mysql_debug(1);
printf("[MYSQL]: Connection to `%s` succesful!", mysql_database);
}
else
{
printf("[MYSQL]: [ERROR]: Connection to `%s` failed!", mysql_database);
}
return 1;
}
Код:
new password[256], IP[16], password2[256],temp[256],query[256];
format(query,sizeof(query),"SELECT * FROM USER WHERE PlayerName = '%s'",RPNU(playerid));
printf("%s",query);
mysql_function_query(mgDBHandle,query,true,"","");
new rows, fields;
rows=0;
fields=0;
cache_get_data(rows, fields);
if(rows)
{
cache_get_row(0, 2, temp);
printf("%d",rows);
//cache_get_field_content(0, "Password", temp);
printf("%s",temp);
printf("ENTER HERE");
}
The field that i try get is password.

My console of server is return this:

Why i get NULL and 4960580 rows?
Please help

