You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
908 B
PHP

<?php
function unfollowButton($pdo, $where, $item_id, $user_id){
print_r($pdo);
$conn = $pdo;
try {
$sql = "SELECT * FROM $from WHERE id = $where";
$stmt = $conn->prepare($sql);
$stmt->execute();
$result = $stmt->setFetchMode(PDO::FETCH_ASSOC);
$record = $stmt->fetch();
} catch (PDOException $e) {
echo "Error in $from: Not Found";
}
return $record;
}
function followButton($pdo, $where, $item_id, $user_id){
print_r($pdo);
$conn = $pdo;
try {
$sql = "SELECT * FROM $from WHERE id = $where";
$stmt = $conn->prepare($sql);
$stmt->execute();
$result = $stmt->setFetchMode(PDO::FETCH_ASSOC);
$record = $stmt->fetch();
} catch (PDOException $e) {
echo "Error in $from: Not Found";
}
return $record;
}
function showStars($pdo, $beer_id, $user_id){
print_r($pdo);
}