sort also by add date
This commit is contained in:
parent
eb9a855467
commit
e2024e3b11
@ -6,7 +6,7 @@ let loadedvideoid = -1;
|
||||
$(document).ready(function () {
|
||||
$.post('php/videoload.php', 'action=getMovies', function (data) {
|
||||
videos = data;
|
||||
loadPreviewBlock(12);
|
||||
loadPreviewBlock(15);
|
||||
}, 'json');
|
||||
|
||||
$.post('php/videoload.php', 'action=getDbSize', function (data) {
|
||||
|
@ -8,7 +8,7 @@ if (isset($_POST['action'])) {
|
||||
$action = $_POST['action'];
|
||||
switch ($action) {
|
||||
case "getMovies":
|
||||
$query = "SELECT movie_id,movie_name FROM videos ORDER BY likes DESC,movie_name ASC";
|
||||
$query = "SELECT movie_id,movie_name FROM videos ORDER BY likes DESC,, create_date ASC, movie_name ASC";
|
||||
$result = $conn->query($query);
|
||||
$rows = array();
|
||||
while ($r = mysqli_fetch_assoc($result)) {
|
||||
|
Loading…
Reference in New Issue
Block a user