Fix sorting for vines

This commit is contained in:
Retrofoxxo 2024-08-07 07:09:16 +00:00 committed by GitHub
parent 3ca704e08a
commit 77879656e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ header('Content-Type: application/json');
?> ?>
<?php <?php
// SQL query to select rows // SQL query to select rows
$sql = "SELECT * FROM vines"; $sql = "SELECT * FROM vines ORDER BY id DESC";
$result = $conn->query($sql); $result = $conn->query($sql);
if ($result->num_rows > 0) { if ($result->num_rows > 0) {

View file

@ -52,7 +52,7 @@ header('Content-Type: application/json');
<?php <?php
// SQL query to select rows containing the searched word // SQL query to select rows containing the searched word
$cid = $_GET['id']; $cid = $_GET['id'];
$sql = "SELECT * FROM vines WHERE uploaderId = '$cid'"; $sql = "SELECT * FROM vines WHERE uploaderId = '$cid' ORDER BY id DESC";
$result = $conn->query($sql); $result = $conn->query($sql);
if ($result->num_rows > 0) { if ($result->num_rows > 0) {