mysql_escape_string - destination size is too small (must be at least as big as source)
#1

Hi,

I get this error:

mysql_escape_string - destination size is too small (must be at least as big as source)

When this happin? and how know where is mistakes because mysql log don't print it. Is this couse if i do like that?

Код:
new EscapeSmthing[ 100 ];

mysql_real_escape_string(EscapeSmthing,EscapeSmthing);
Reply
#2

For an example :
You do it under zcmd then it will be something like this
Код:
 
CMD:blah(playerid,params[])
{
new EscapeSmthing[ 100 ];
mysql_real_escape_string(params,EscapeSmthing);
}
On player text then
Код:
new EscapeSmthing[ 100 ];
mysql_real_escape_string(text,EscapeSmthing);
https://sampwiki.blast.hk/wiki/MySQL#mys..._escape_string

Once have a look there , if any doubt don't hesitate to message me. Good day.
Reply
#3

Now other question, i have sometimes that there is syntax error in query but it's not always just sometimes, because i safe there text and that text can change players maybe they change to that text what give that syntax error, but i'am escaping it before saving what i have do more or what symbols more i need forbid
Reply
#4

Go more brief and provide the codes. As we may help you in a more liberal way. Good day.
Reply
#5

Just simple what text that occur syntax error?
Reply
#6

Maybe this symbol '\' can occur syntax error?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)