note 108721 added to function.mysql-connect
| From: | nicodenboer at yahoo dot com | Date: | Sun, 20 May 2012 13:50:46 +0000 |
| Subject: | note 108721 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188094@lists.php.net to get a copy of this message | ||
Be carefull here if you use utf8.
The file db.opt of your database should contain the following lines:
default-character-set=utf8
default-collation=utf8_general_ci
It means that your database is created to use the utf8 characterset.
One way to accomplish this is:
CREATE DATABASE my_database DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Then, after connecting to it from PHP you should use:
mysql_set_charset("UTF8", $connection);
If you don't do this, you will get ugly problems in case other software is reading and writing
to the same database!!!!!!
----
Server IP: 69.147.83.197
Probable Submitter: 195.191.202.173
----
Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php
Edit -- https://master.php.net/note/edit/108721
Del: integrated -- https://master.php.net/note/delete/108721/integrated
Del: useless -- https://master.php.net/note/delete/108721/useless
Del: bad code -- https://master.php.net/note/delete/108721/bad+code
Del: spam -- https://master.php.net/note/delete/108721/spam
Del: non-english -- https://master.php.net/note/delete/108721/non-english
Del: in docs -- https://master.php.net/note/delete/108721/in+docs
Del: other reasons-- https://master.php.net/note/delete/108721
Reject -- https://master.php.net/note/reject/108721
Search -- https://master.php.net/manage/user-notes.php