Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by B-Matt
pawn Код:
[ERROR] mysql_escape_string - destination size is too small
Maybe to put string which is the cause of the error? Something like this:
pawn Код:
[ERROR] mysql_escape_string ("Bla bla bla") - destination size is too small
This could be helpful in debugging the errors.
|
Good idea, I'll change that in every native.
Quote:
Originally Posted by HitnKill
I have an idea for don't change all my script with this vR7 MYSQL.
Example my old function
PHP код:
R6
if(IPBanned(plrip) > 0)
{
// code....
}
IPBanned(ip[])
{
new query[100],ipexist;
format(query,sizeof(query),"SELECT IP FROM `dm_bans` WHERE IP = '%s' LIMIT 1",ip);
mysql_query(query);
mysql_store_result();
new rows = mysql_num_rows();
if(rows > 0) ipexist = 1;
else ipexist = 0;
mysql_free_result();
return ipexist;
}
PHP код:
R7
if(IPBanned(plrip,0) > 0)
{
// code...
}
forward IPBanned(ip[],ID);
public IPBanned(ip[],ID)
{
if(ID == 0)
{
new query[100];
format(query,sizeof(query),"SELECT IP FROM `dm_bans` WHERE IP = '%s' LIMIT 1",ip);
mysql_function_query(ConnexionBDD, query, true, "IPBanned", "si",ip,1);
}
else
{
new rows,fields,ipexist;
cache_get_data(rows, fields);
if(rows > 0) ipexist = 1;
else ipexist = 0;
return ipexist;
}
return 0;
}
Don't problem with this codes on R7 if i call a same function?
|
This won't work. The upgrade from threaded to unthreaded queries require sometimes a system design change in the gamemode. You could for example load all the data you need with one query (with a JOIN statement) and then if there is some data use the data and ask the player for a login, and if there is no data ask the player to register.
Quote:
Originally Posted by Lorenc_
I like the errno function! Better than the callback style to the least!
Anyway, just documentation perhaps & this is perfect.
|
I'll need someone with a Wiki account.
EDIT:
Quote:
Originally Posted by -Prodigy-
How do you get the plugin running? I'm using latest version from the repository. Sorry if I missed something, first time testing the latest version.
Trying to test windows version.. when I start the server the plugin doesn't load.
|
Are you trying to compile it by yourself? Or did you just use the latest download?
What OS are you using? (XP, 7, 8?)