The menu now backend supported

It loads the friends and groups of userID 2 by default (only if there is no session userID set
This commit is contained in:
Lars van Hijfte
2017-01-17 14:16:17 +01:00
parent 10d3e177ae
commit 6385324b13
6 changed files with 120 additions and 95 deletions

View File

@@ -0,0 +1,21 @@
<?php
function selectAllGroupsFromUser($db, $userID) {
return $db->query("
SELECT
`group_page`.`name`,
`group_page`.`picture`
FROM
`group_page`
INNER JOIN
`group_member`
WHERE
`group_member`.`userID` = $userID AND
`group_member`.`groupID` = `group_page`.`groupID` AND
`group_page`.`status` != 0
");
}
?>