changements faits

This commit is contained in:
2019-03-02 00:49:48 +01:00
parent 91806d4112
commit cb6f9a967b
15 changed files with 349 additions and 327 deletions

View File

@ -65,7 +65,7 @@ class Category {
*/
public static function list($recent = true, $limit = 100) {
$sort = $recent ? "DESC" : "ASC";
$query = "SELECT * FROM categories ORDER BY " . $sort . " LIMIT " . $limit;
$query = "SELECT * FROM categories ORDER BY name " . $sort . " LIMIT " . $limit;
$pdo = Functions::connect();
$cats = $pdo->query($query)->fetchAll();

View File

@ -31,7 +31,7 @@ class Tag {
*/
public static function list($recent = true, $limit = 100) {
$sort = $recent ? "DESC" : "ASC";
$query = "SELECT * FROM tag ORDER BY " . $sort . " LIMIT " . $limit;
$query = "SELECT * FROM tag ORDER BY name " . $sort . " LIMIT " . $limit;
$pdo = Functions::connect();
$cats = $pdo->query($query)->fetchAll();