Marijn button #99
@@ -2,12 +2,12 @@
|
|||||||
require("connect.php");
|
require("connect.php");
|
||||||
|
|
||||||
function selectAllFriends($db, $userID) {
|
function selectAllFriends($db, $userID) {
|
||||||
$stmt = $db->prepare("
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
SELECT
|
SELECT
|
||||||
`username`,
|
`username`,
|
||||||
IFNULL(
|
IFNULL(
|
||||||
`profilepicture`,
|
`profilepicture`,
|
||||||
'img/notbad.png'
|
'../img/notbad.jpg'
|
||||||
) AS profilepicture,
|
) AS profilepicture,
|
||||||
`onlinestatus`,
|
`onlinestatus`,
|
||||||
`role`
|
`role`
|
||||||
@@ -26,5 +26,6 @@ function selectAllFriends($db, $userID) {
|
|||||||
|
|
||||||
$stmt->bindParam(':userID', $userID, PDO::PARAM_INT);
|
$stmt->bindParam(':userID', $userID, PDO::PARAM_INT);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
|
||||||
return $stmt;
|
return $stmt;
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ function selectUser($db, $userID) {
|
|||||||
`username`,
|
`username`,
|
||||||
IFNULL(
|
IFNULL(
|
||||||
`profilepicture`,
|
`profilepicture`,
|
||||||
'img/notbad.png'
|
'../img/notbad.jpg'
|
||||||
) AS profilepicture,
|
) AS profilepicture,
|
||||||
`bio`,
|
`bio`,
|
||||||
`role`,
|
`role`,
|
||||||
@@ -42,7 +42,7 @@ function selectUser($db, $userID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function selectAllUserGroups($db, $userID) {
|
function selectAllUserGroups($db, $userID) {
|
||||||
$stmt = $db->prepare("
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
SELECT
|
SELECT
|
||||||
`group_page`.`groupID`,
|
`group_page`.`groupID`,
|
||||||
`name`,
|
`name`,
|
||||||
@@ -65,7 +65,7 @@ function selectAllUserGroups($db, $userID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function selectAllUserPosts($db, $userID) {
|
function selectAllUserPosts($db, $userID) {
|
||||||
$stmt = $db->prepare("
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
SELECT
|
SELECT
|
||||||
`postID`,
|
`postID`,
|
||||||
`author`,
|
`author`,
|
||||||
|
|||||||
Reference in New Issue
Block a user