diff --git a/database/cloud-server.mwb b/database/cloud-server.mwb index 3a536bb..4dc7963 100644 Binary files a/database/cloud-server.mwb and b/database/cloud-server.mwb differ diff --git a/src/application/model/follow.php b/src/application/model/follow.php new file mode 100644 index 0000000..9e0aba6 --- /dev/null +++ b/src/application/model/follow.php @@ -0,0 +1,27 @@ +_db->execute("SELECT `followUser`.`userId` FROM `followUser` + JOIN `follow` ON (`follow`.`followId` = `followUser`.`followId`) + + WHERE `follow`.`userId` = ? + + GROUP BY `followUser`.`userId` + ORDER BY `follow`.`seq` DESC"); + + $query->execute([$userId]); + + return $query->rowCount() ? $query->fetch() : []; + + } catch (PDOException $e) { + + trigger_error($e->getMessage()); + return false; + } + } +} \ No newline at end of file