diff --git a/website/public/API/getPosts.php b/website/public/API/getPosts.php index eef8261..620a707 100644 --- a/website/public/API/getPosts.php +++ b/website/public/API/getPosts.php @@ -1,13 +1,17 @@ = 150 AND `post`.`content` NOT LIKE 'bindParam(':userID', $userID, PDO::PARAM_INT); + $stmt->bindParam(':groupID', $groupID , PDO::PARAM_INT); + if(!$stmt->execute()) { + return False; + } + return $stmt; + +} + function selectPostById($postID) { $stmt = prepareQuery(" SELECT diff --git a/website/queries/user.php b/website/queries/user.php index ec211c0..e3bf758 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -103,47 +103,47 @@ function selectAllUserGroups($userID) { return $stmt; } -function selectAllUserPosts($userID) { - $stmt = prepareQuery(" - SELECT - `post`.`postID`, - `post`.`author`, - `title`, - CASE LENGTH(`post`.`content`) >= 150 AND `post`.`content` NOT LIKE 'bindParam(':userID', $userID, PDO::PARAM_INT); - if(!$stmt->execute()) { - return False; - } - return $stmt; -} +//function selectAllUserPosts($userID) { +// $stmt = prepareQuery(" +// SELECT +// `post`.`postID`, +// `post`.`author`, +// `title`, +// CASE LENGTH(`post`.`content`) >= 150 AND `post`.`content` NOT LIKE 'bindParam(':userID', $userID, PDO::PARAM_INT); +// if(!$stmt->execute()) { +// return False; +// } +// return $stmt; +//} function select20UsersFromN($n) { $q = prepareQuery("