mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-27 10:43:41 -04:00
* 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
14 lines
323 B
PHP
14 lines
323 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
final class FreshRSS_CategoryDAOPGSQL extends FreshRSS_CategoryDAO {
|
|
|
|
#[\Override]
|
|
public function sqlResetSequence(): bool {
|
|
$sql = <<<'SQL'
|
|
SELECT setval('`_category_id_seq`', COALESCE(MAX(id), 0) + 1, false) FROM `_category`
|
|
SQL;
|
|
return $this->pdo->exec($sql) !== false;
|
|
}
|
|
}
|