From fcf206a2da8e7dddefd05eb1bf558e8a6df2ff48 Mon Sep 17 00:00:00 2001 From: TheMrNomis Date: Thu, 31 Mar 2016 10:27:27 +0200 Subject: [PATCH] updated getCategoriesForOneEvent --- databaseOperations.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/databaseOperations.php b/databaseOperations.php index 78eda40..878203b 100755 --- a/databaseOperations.php +++ b/databaseOperations.php @@ -170,8 +170,9 @@ function getCategoriesForOneEvent($db, $eventId) $request->execute(array($eventId)); $result = $request->fetchAll(); $request->closeCursor(); - for($i=0; $i < count($result); $i++) $result[$i] = $result[$i][0]; - return $result; + foreach($result as $oneResult) + $categories[] = $oneResult["cat_id"]; + return $categories; } catch(PDOException $e) {