ID:               41227
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php_debugger at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         MySQL related
 Operating System: Windows XP
 PHP Version:      5.2.1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2007-04-29 23:18:39] judas dot iscariote at gmail dot com

You should use mysqli and the mysqli_set_charset() function.

------------------------------------------------------------------------

[2007-04-29 18:16:04] php_debugger at yahoo dot com

Description:
------------
I have met this "bug" while I was creating a Russian site. I have a web
form(ENCODING:UTF-8) and a simple query(My db uses UTF-8). When I submit
the form, I get an error which says that the string is too long for the
column but it is not the case(I just type the letters).

After a while debugging I have found out what is the problem. When I
use mysql_real_escape_string() I get the error else I do not.

I have searched in the php site but I found nothing which has to do
with encoding.

Reproduce code:
---------------
//I will give only the php code though it is very simple
<?php
//MySQL connections and other stuff like this has been omitted because
//of the code's size
$name = mysql_real_escape_string($_POST['name']);

mysql_query("insert into users set name='".$name."');
?>

Expected result:
----------------
No errors.

Actual result:
--------------
MySQL error which says that the string is too long.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41227&edit=1

Reply via email to