note 48889 added to function.mysqli-real-connect
| From: | hunreal at gmail dot com | Date: | Tue, 11 Jan 2005 08:52:04 +0000 |
| Subject: | note 48889 added to function.mysqli-real-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-83062@lists.php.net to get a copy of this message | ||
To use different character to connet mysql. Try this,
$mysqli = mysqli_init();
$mysqli->options(MYSQLI_INIT_COMMAND, "SET NAMES 'UTF8'");
$mysqli->real_connect($mysqli_addr, $mysqli_user, $mysqli_pass, $mysqli_db);
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
----
Manual Page -- http://www.php.net/manual/en/function.mysqli-real-connect.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+48889
Delete -- http://master.php.net/manage/user-notes.php?action=delete+48889&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48889&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48889&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48889&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48889&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48889&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+48889&report=yes
Search -- http://master.php.net/manage/user-notes.php