fetch one row, return array

@param string $sql
@return array
166783
public function fetch_array($sql)
    {
        $rs   = $this->query($sql);
        $data = $rs->fetchArray(SQLITE3_ASSOC);
        $GLOBALS['__$DB_QUERY_COUNT']++;

        $rs->finalize();
        return $data;
    }
1268801
public function fetchAll($sql, array $parameters = [])
    {
        $stm = $this->lazyLoad()->prepare($sql);
        $stm->execute($parameters);
        $array = $stm->fetchAll(\PDO::FETCH_ASSOC);
        // @see https://stackoverflow.com/a/883382/1335142
        $this->numRows = $stm->rowCount();

        return $array;
    }
1302558
public function fetch_objects($sql)
    {
        $data = [];
        $result = $this->fetch_arrays($sql);
        foreach ($result as $v) {
            $data[] = (object)$v;
        }

        return $data;
    }
555583
protected function fetch( $sql, $params = null ) {
		$stmt = $this->dbh->prepare( $sql );
		$this->bind( $stmt, $params );
		$stmt->execute();
		return $stmt->fetch();
	}
1374195
public function fetchAll($sql, $key = null, $values = null, $connection = null)
  {
    $st = $this->query($sql, $values, $connection);

    if (!$res = $st->fetchAll(\PDO::FETCH_ASSOC)) {
      return false;
    }

    if (!$key) {
      return $res;
    }

    if (!array_key_exists($key, current($res))) {
      Exception::ThrowError(Exception::COLUMN_NOT_EXISTS, $key);
    }

    $out = array();
    foreach ($res as $row) {
      $out[$row[$key]] = $row;
    }

    return $out;
  }
365925
public function prepare($sql)
    {
        $this->_connect();
        $stmtClass = $this->_defaultStmtClass;
        $stmt = new $stmtClass($this, $sql);
        $stmt->setFetchMode($this->_fetchMode);
        return $stmt;
    }
1369982
public function fetch_string($sql)
    {

        if (empty($sql)) return false;

        $res = $this->query($sql);
        $row = @mysql_fetch_array($res);

        return (string)$row[0];
    }
878619
public function count($sql)
    {
        $result = $this->execute($sql);
        $res = $result->fetch(PDO::FETCH_ASSOC);
        return $res['total'];
    }
189079
public function fetch_assoc($sql)
    {

        if (empty($sql)) return false;

        $res    = $this->query($sql);
        $result = @mysql_fetch_assoc($res);
        $this->free($res);

        return $result;
    }
773588
public function queryAndFetchOne($sql, &$values=array())
	{
		$sth = $this->query($sql, $values);
		$row = $sth->fetch(PDO::FETCH_NUM);
		return $row[0];
	}
1249497
public function getAll($sql, array $args = [])
    {
        $query = $this->query($sql, $args);
        if (!$query) {
            return [];
        }
        
        $rs = $query->fetchAll(\PDO::FETCH_ASSOC);
        return $rs;
    }
522832
protected function query_row ( $sql )
	{
		$sql = $this->sql_printf(func_get_args());
		if (!($res = mysqli_query( $this->conn, $sql)))
		{
			$this->sql_errcheck($sql);
		}
		if ($row = mysqli_fetch_array($res))
		{
			$rs = $row;
		}
		else
		{
			$rs = false;
		}
		((mysqli_free_result($res) || (is_object($res) && (get_class($res) == "mysqli_result"))) ? true : false);
		return $rs;
	}
1221076
protected function query_one ( $sql )
	{
		$sql = $this->sql_printf(func_get_args());
		if (!($res = mysqli_query( $this->conn, $sql)))
		{
			$this->sql_errcheck($sql);
		}
		if ($row = mysqli_fetch_assoc($res))
		{
			$val = array_pop($row);
		}
		else
		{
			$val = false;
		}
		((mysqli_free_result($res) || (is_object($res) && (get_class($res) == "mysqli_result"))) ? true : false);
		return $val;
	}
1204547
public function getRow($sql, $params = null)
    {
        $stmt = $this->execute($sql, $params);

        return $stmt->fetch(PDO::FETCH_ASSOC);
    }
689927
public function fetch_arrays($sql)
    {
        $result = $this->query($sql);

        $data  = [];
        while (true == ($row = mysql_fetch_assoc($result))) {
            $data[] = $row;
        }
        mysql_free_result($result);
        return $data;
    }
1294087
private function query($sql) {
		if ($sth = $this->DB->query($sql)) {
			$res = $sth->fetchAll(PDO::FETCH_COLUMN);
		} else {
			$res = false;
		}
		return $res;
	}
248817
protected function getOrderBySql(array $sql): array
    {
        if (empty($this->orderBy)) {
            return $sql;
        }
        $sql[] = 'ORDER BY ' . implode(', ', $this->quoter->quoteByFields($this->orderBy));

        return $sql;
    }