SA-MP Forums Archive
MYSQL Question.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MYSQL Question.. (/showthread.php?tid=491873)



MYSQL Question.. - RLGaming - 01.02.2014

Okay, I have only recently noticed this and I am just wondering, is it just me or can you not have the apostrophe character in a mysql query? (')

Is there anyway around this?

Thanks in advance!


Re: MYSQL Question.. - maddinat0r - 01.02.2014

You have to escape the string you want to use in a query. There should be a native like "mysql_escape_string" provided by the MySQL plugin you are using. Also don't escape the whole query string, only the string you want to use in the query.


Re: MYSQL Question.. - RLGaming - 01.02.2014

Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
You have to escape the string you want to use in a query. There should be a native like "mysql_escape_string" provided by the MySQL plugin you are using. Also don't escape the whole query string, only the string you want to use in the query.
Great, thank you very much!