note 66131 added to function.mysql-client-encoding

From: Date: Mon, 15 May 2006 15:56:04 +0000
Subject: note 66131 added to function.mysql-client-encoding
Groups: php.notes 
Request: Send a blank email to php-notes+get-111327@lists.php.net to get a copy of this message
I couldn't get any luck with all the stuff mentioned below, and despite having an unicode DB, and setting all my field to utf8_general_ci... After looking around, I found that this page: http://dev.mysql.com/tech-resources/articles/4.1/unicode.html was adding the fields with an extra info before each value: <? mysql_query("INSERT INTO table SET field = _utf8'value'"); ?> Mind the "_utf8" before the field value, and outside of the quotes. This works for me wether in an Insert or an Update statement. No need here for a <? mysql_query("SET NAMES utf8"); ?> before each query, or to change anything in the config files (that was important since I don't have access to these). ---- Server IP: 66.163.161.117 Probable Submitter: 82.67.151.59 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-client-encoding.php Edit -- http://master.php.net/note/edit/66131 Del: integrated -- http://master.php.net/note/delete/66131/integrated Del: useless -- http://master.php.net/note/delete/66131/useless Del: bad code -- http://master.php.net/note/delete/66131/bad+code Del: spam -- http://master.php.net/note/delete/66131/spam Del: non-english -- http://master.php.net/note/delete/66131/non-english Del: in docs -- http://master.php.net/note/delete/66131/in+docs Del: other reasons-- http://master.php.net/note/delete/66131 Reject -- http://master.php.net/note/reject/66131 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111327) next »