|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-05-16 17:27 UTC] dc at ftb-esv dot de
Description: ------------ --- From manual page: http://www.php.net/mysqli.real-escape-string --- real_escape_string escapes a NULL to "\0", but this is wrong! It must be escaped to "\000" or conversions are wrong, if a digit follows. Test script: --------------- $a = "a\000" . "1b"; echo mysqli->real_escape_string($a); RESULT: a\01b => 'a' . '\01' . 'b' PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 15:00:01 2025 UTC |
MySQL does not have octal escape sequences. mysql> SELECT "a\01b"; +------+ | a | +------+ | a 1b | +------+ 1 row in set (0.00 sec) mysql> SELECT HEX("a\01b"); +--------------+ | HEX("a\01b") | +--------------+ | 61003162 | +--------------+ 1 row in set (0.07 sec)