Commit with composer.json
This commit is contained in:
@ -83,23 +83,23 @@ class MySQLiStatement extends DbStatement
|
||||
* @return mixed
|
||||
* @throws GeneralException
|
||||
*/
|
||||
public function fetch($style = Db::FETCH_OBJ)
|
||||
public function fetch($style = \Majestic\Db::FETCH_OBJ)
|
||||
{
|
||||
if (!$this->result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch ($style) {
|
||||
case Db::FETCH_OBJ:
|
||||
case \Majestic\Db::FETCH_OBJ:
|
||||
$row = $this->result->fetch_object();
|
||||
break;
|
||||
case Db::FETCH_NUM:
|
||||
case \Majestic\Db::FETCH_NUM:
|
||||
$row = $this->result->fetch_array(MYSQLI_NUM);
|
||||
break;
|
||||
case Db::FETCH_ASSOC:
|
||||
case \Majestic\Db::FETCH_ASSOC:
|
||||
$row = $this->result->fetch_assoc();
|
||||
break;
|
||||
case Db::FETCH_BOTH:
|
||||
case \Majestic\Db::FETCH_BOTH:
|
||||
$row = $this->result->fetch_array(MYSQLI_BOTH);
|
||||
break;
|
||||
default:
|
||||
@ -123,7 +123,7 @@ class MySQLiStatement extends DbStatement
|
||||
public function fetchPairs()
|
||||
{
|
||||
$data = array();
|
||||
while ($row = $this->fetch(Db::FETCH_NUM)) {
|
||||
while ($row = $this->fetch(\Majestic\Db::FETCH_NUM)) {
|
||||
$data[$row[0]] = $row[1];
|
||||
}
|
||||
return $data;
|
||||
|
Reference in New Issue
Block a user