Differential D15078 Diff 36408 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 55 Lines • ▼ Show 20 Lines | $conn = @mysql_connect( | ||||
$user, | $user, | ||||
$pass, | $pass, | ||||
$new_link = true, | $new_link = true, | ||||
$flags = 0); | $flags = 0); | ||||
if (!$conn) { | if (!$conn) { | ||||
$errno = mysql_errno(); | $errno = mysql_errno(); | ||||
$error = mysql_error(); | $error = mysql_error(); | ||||
throw new AphrontConnectionQueryException( | $this->throwConnectionException($errno, $error, $user, $host); | ||||
pht( | |||||
'Attempt to connect to %s@%s failed with error #%d: %s.', | |||||
$user, | |||||
$host, | |||||
$errno, | |||||
$error), | |||||
$errno); | |||||
} | } | ||||
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); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |