use mysqli_set_charset instead of set names
This commit is contained in:
parent
7b1a72da30
commit
a262f83210
@ -121,10 +121,14 @@ function doConnect($charset)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $db->query("SET NAMES $charset");
|
// $result = $db->query("SET NAMES $charset");
|
||||||
|
|
||||||
if (PEAR::isError($result)) {
|
$conn = $db->connection;
|
||||||
echo "ERROR: " . $result->getMessage() . "\n";
|
|
||||||
|
$succ = mysqli_set_charset($conn, $charset);
|
||||||
|
|
||||||
|
if (!$succ) {
|
||||||
|
echo "ERROR: couldn't set charset\n";
|
||||||
$db->disconnect();
|
$db->disconnect();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user