Question about escaping strings
#1

Hello, sorry for my annoying questions, but when should i escape strings when using mysql R7?
when i tried to escape a string using " %e " place holder into an INSERT query for a hashed password it inserted " e " into the field...
Reply
#2

hmm I can't tell you what problem is, but I can suggest you to use mysql_real_escape_string()
Reply
#3

You can just escape the strings manually by using the back-slash before apostrophes.
pawn Код:
new query[128];

format(query, sizeof(query), "INSERT INTO `table` ('Password') VALUES (\'%s\')", "password123");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)