25.08.2015, 17:44
Hey there, I'm really confused, what is going on in my script.
I'm using "easy-to-use" StrickenKid's mysql plugin.
The problem is, that my sql query isn't returning sometimes what it should return. For instance:

It has to return player nickname and sometimes it returns database name realnyzivot_server as you can see here:

I'm sure it isn't caused by plugin, because it did even before plugin update (change)
My function looks like this:
I ran out of ideas.
I'm using "easy-to-use" StrickenKid's mysql plugin.
The problem is, that my sql query isn't returning sometimes what it should return. For instance:

It has to return player nickname and sometimes it returns database name realnyzivot_server as you can see here:
I'm sure it isn't caused by plugin, because it did even before plugin update (change)
My function looks like this:
Код:
new query[150],data[512];
format(query,sizeof(query),"SELECT %s FROM %s WHERE %s LIMIT 1",value,table,podminka);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() == 0){
format(data,sizeof(data),"");
} else {
mysql_fetch_field(value,data);
}
mysql_free_result();
return data;

