Example #1
0
 public static function getFriendIds($userId)
 {
     $self = new self();
     $stmt = $self->prepareStatement(Sabel_Db_Statement::SELECT);
     $stmt->projection(array("follow_id"))->where("WHERE user_id = @user_id@")->constraints(array("order" => array("created_at" => "asc")))->setBindValue("user_id", $userId);
     $ids = array();
     if ($rows = $stmt->execute()) {
         foreach ($rows as $row) {
             $ids[] = (int) $row["follow_id"];
         }
     }
     return $ids;
 }