merge mongo with master
This commit is contained in:
@ -80,7 +80,7 @@ class MySQLiStatement extends DbStatement
|
||||
|
||||
/**
|
||||
* Fetches single row
|
||||
*
|
||||
*
|
||||
* @param mixed $style
|
||||
* @return mixed
|
||||
*/
|
||||
@ -89,7 +89,7 @@ class MySQLiStatement extends DbStatement
|
||||
if (!$this->result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$row = false;
|
||||
switch ($style) {
|
||||
case Db::FETCH_OBJ:
|
||||
@ -105,11 +105,11 @@ class MySQLiStatement extends DbStatement
|
||||
$row = $this->result->fetch_array(MYSQLI_BOTH);
|
||||
break;
|
||||
default:
|
||||
throw new Exception('Invalid fetch mode "' . $style . '" specified');
|
||||
throw new GeneralException('Invalid fetch mode "' . $style . '" specified');
|
||||
}
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
*/
|
||||
@ -129,7 +129,7 @@ class MySQLiStatement extends DbStatement
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
public function close()
|
||||
{
|
||||
if ($this->result !== null) {
|
||||
@ -137,12 +137,12 @@ class MySQLiStatement extends DbStatement
|
||||
$this->result = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function affectedRows()
|
||||
{
|
||||
return $this->driver->getConnection()->affected_rows;
|
||||
}
|
||||
|
||||
|
||||
public function numRows()
|
||||
{
|
||||
if ($this->result) {
|
||||
@ -150,7 +150,7 @@ class MySQLiStatement extends DbStatement
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
protected function driverExecute($request)
|
||||
{
|
||||
/**
|
||||
@ -166,7 +166,7 @@ class MySQLiStatement extends DbStatement
|
||||
}
|
||||
if ($result === false) {
|
||||
$message = $mysqli->error . "\nQuery: \"" . $request . '"';
|
||||
throw new Exception($message, $mysqli->errno);
|
||||
throw new GeneralException($message, $mysqli->errno);
|
||||
}
|
||||
if ($result instanceof MySQLi_Result) {
|
||||
$this->result = $result;
|
||||
|
Reference in New Issue
Block a user