mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-12 22:50:07 +01:00
Function Fixes
Would help if I didn't somehow hit ctrl Z and delete what I just edited.
This commit is contained in:
parent
604154f414
commit
ca7c38d488
1 changed files with 2 additions and 1 deletions
|
@ -33,11 +33,12 @@ function getUserFavs($conn, $username) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function CountPasteFavs($conn, $fav_id) {
|
function CountPasteFavs($conn, $fav_id) {
|
||||||
$query = intval($conn->prepare("SELECT COUNT(f_paste) FROM pins WHERE f_paste=?"))->fetch(PDO::FETCH_NUM)[0]);
|
$query = intval($conn->prepare("SELECT COUNT(f_paste) FROM pins WHERE f_paste=?")->fetch(PDO::FETCH_NUM)[0]);
|
||||||
$query->execute([$fav_id]);
|
$query->execute([$fav_id]);
|
||||||
return $query->fetchAll();
|
return $query->fetchAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Can't seem to get working.
|
//Can't seem to get working.
|
||||||
function checkFavorite($conn,$paste_id, $user_id) {
|
function checkFavorite($conn,$paste_id, $user_id) {
|
||||||
$result = $conn->query("SELECT * FROM pins WHERE m_fav = ? AND f_paste = ?");
|
$result = $conn->query("SELECT * FROM pins WHERE m_fav = ? AND f_paste = ?");
|
||||||
|
|
Loading…
Add table
Reference in a new issue