public function column(string $statement, array $params = [], int $offset = 0)
{
try {
if (empty($params)) {
$stmt = $this->pdo->query($statement, \PDO::FETCH_COLUMN, $offset);
if ($stmt !== false) {
return $stmt->fetchAll(\PDO::FETCH_NUM);
}
return false;
} else {
if (!\is1DArray($params)) {
throw new \TypeError(\trk('errors.database.array_passed'));
}
$stmt = $this->pdo->prepare($statement);
if ($stmt->execute($params) !== false) {
return $stmt->fetchAll(\PDO::FETCH_COLUMN, $offset);
}
}
return false;
} catch (\PDOException $e) {
throw new DBAlert\QueryError($e->getMessage());
}
}