Differential D10604 Diff 25480 src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnection.php
Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnection.php
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | protected function connect() { | ||||
if ($database !== null) { | if ($database !== null) { | ||||
$ret = @mysql_select_db($database, $conn); | $ret = @mysql_select_db($database, $conn); | ||||
if (!$ret) { | if (!$ret) { | ||||
$this->throwQueryException($conn); | $this->throwQueryException($conn); | ||||
} | } | ||||
} | } | ||||
$ok = mysql_set_charset('utf8mb4', $conn); | |||||
if (!$ok) { | |||||
mysql_set_charset('utf8', $conn); | mysql_set_charset('utf8', $conn); | ||||
} | |||||
return $conn; | return $conn; | ||||
} | } | ||||
protected function rawQuery($raw_query) { | protected function rawQuery($raw_query) { | ||||
return @mysql_query($raw_query, $this->requireConnection()); | return @mysql_query($raw_query, $this->requireConnection()); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 129 Lines • Show Last 20 Lines |