mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-12 14:40:09 +01:00
update functions
Missed mothpop function
This commit is contained in:
parent
9668228914
commit
4465f60766
1 changed files with 5 additions and 6 deletions
|
@ -136,13 +136,12 @@ function recentupdate($conn, $count) {
|
||||||
return $query->fetchAll();
|
return $query->fetchAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Cannot get this to work.
|
||||||
function monthpop($conn, $count = 10) {
|
function monthpop($conn, $count) {
|
||||||
$limit = $count ? "limit $count" : "";
|
|
||||||
$p_month = date('F');
|
$p_month = date('F');
|
||||||
$query = "SELECT s_date, views, title, id, now_time, visible, tagsys, member FROM pastes WHERE s_date LIKE '% $p_month %' AND visible = '0' ORDER BY views + 0 DESC LIMIT 10, $count";
|
$query = $conn->prepare("SELECT s_date, views, title, id, now_time, visible, tagsys, member FROM pastes WHERE s_date LIKE ? AND visible = '0' ORDER BY views + 0 DESC LIMIT 10, ?");
|
||||||
$result = mysqli_query($conn, $query);
|
$query->execute([$p_month,$count]);
|
||||||
return $result;
|
return $query->fetchAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue