mysql_real_escape_string
#3

Quote:
Originally Posted by Abagail
Посмотреть сообщение
mysql_format doesn't automatically escape strings, so don't assume it does. However mysql_format does offer an 'e' specifier for strings that handles escaping in-line.

So instead of "WHERE name = '%s'", you can use "WHERE name = '%e'", no need for mysql_real_escape_string if you use this. Note that this doesn't work with the regular format function within SA-MP (not that you should be using it for SQL queries anyway).
Thanks for answer!
Reply


Messages In This Thread
mysql_real_escape_string - by RedGun2015 - 24.10.2017, 15:54
Re: mysql_real_escape_string - by Abagail - 24.10.2017, 15:56
Re: mysql_real_escape_string - by RedGun2015 - 25.10.2017, 11:53
Re: mysql_real_escape_string - by CodeStyle175 - 25.10.2017, 14:35

Forum Jump:


Users browsing this thread: 3 Guest(s)