예제 #1
0
파일: model.php 프로젝트: Tungse/croncase
 public function getUnreadEventComment($uid)
 {
     $query = "select eid, id from userEvent where commentReaded = 0 and uid = " . $uid . " group by eid order by modify desc";
     $queryResult = parent::query($query);
     $unreadEventComment = array();
     while ($result = parent::fetchAssoc($queryResult)) {
         $querySecong = "select u.firstname, u.lastname, u.uid, e.name, e.eid, ce.comment, ce.created from users as u, event as e, commentEvent as ce\n                                where ce.wid = u.uid and e.eid = ce.eid and ce.wid != " . $uid . " and ce.eid = " . $result['eid'] . " order by ce.created desc limit 0, 1";
         $queryResultSecond = parent::query($querySecong);
         while ($resultSecond = parent::fetchAssoc($queryResultSecond)) {
             $unreadEventComment[] = array('uid' => $resultSecond['uid'], 'name' => $resultSecond['firstname'] . ' ' . $resultSecond['lastname'], 'eventName' => $resultSecond['name'], 'eid' => $result['eid'], 'ueid' => $result['id'], 'comment' => $resultSecond['comment'], 'created' => date('d F \\a\\t H:i', strtotime($resultSecond['created'])));
         }
     }
     return $unreadEventComment;
 }
예제 #2
0
파일: model.php 프로젝트: Tungse/croncase
 private function getAllProfileData()
 {
     $query = "select pb.birth, pb.relationship, pb.email, pb.aboutMe, pb.website, pb.location, pb.hometown, pb.politics, pb.religious,\n                    pi.activities, pi.interests, pi.films, pi.music, pi.books, pi.quotations,\n                    pe.school, pe.leavingYearsSchool, pe.university, pe.leavingYearsUniversity, pe.courses, pe.employer, pe.position, pe.description, pe.city, pe.since\n                    from profileBasic as pb, profileInterest as pi, profileEducation as pe\n                    where pb.uid = pi.uid and pb.uid = pe.uid and pb.uid = " . $this->user['uid'];
     $queryResult = parent::query($query);
     return parent::fetchAssoc($queryResult);
 }