|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-27 21:45 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Jun 18 00:00:02 2026 UTC |
Description: ------------ Good Day! When i'm trying to add string to mysql (using mysqli) which contents char with code 39, mysql does not give me an error, but don't add this line to mysql Reproduce code: --------------- function _encode($val, $key, $iv) { $iv = substr($iv, 0, 8); $cipher = mcrypt_module_open(MCRYPT_BLOWFISH, '', 'cbc', ''); mcrypt_generic_init($cipher, $key, $iv); $ret = mcrypt_generic($cipher, $val); mcrypt_generic_deinit($cipher); return $ret; } ... // encoded string (may contain char 39) $msumm = _encode("12345", "some_key", "some_vector"); ... mysqli_query($db, "INSERT INTO table(`date`, `in`) VALUES(time(), $msumm)"); Expected result: ---------------- MySQL have to contain new row with values Actual result: -------------- MySQL fails to add new line, but don't give me any error