Files
Alexandre Alapetite aeb55693e4 SQL improve PHP syntax uniformity (#8604)
* New SQL wrapper function `fetchInt()`
* Favour use of `fetchAssoc()`, `fetchInt()`, `fetchColumn()`
* Favour Nowdoc / Heredoc syntax for SQL
    * Update indenting to PHP 8.1+ convention
* Favour `bindValue()` instead of position `?` when possible
* Favour `bindValue()` over `bindParam()`
* More uniform and robust syntax when using `bindValue()`, checking return code
2026-03-15 14:44:39 +01:00

19 lines
374 B
PHP

<?php
declare(strict_types=1);
class FreshRSS_TagDAOPGSQL extends FreshRSS_TagDAO {
#[\Override]
public function sqlIgnore(): string {
return ''; //TODO
}
#[\Override]
public function sqlResetSequence(): bool {
$sql = <<<'SQL'
SELECT setval('`_tag_id_seq`', COALESCE(MAX(id), 0) + 1, false) FROM `_tag`
SQL;
return $this->pdo->exec($sql) !== false;
}
}