コード例 #1
0
ファイル: TicketResponses.php プロジェクト: wappr/ticklr
 /**
  * Gets responses to tickets by a User ID. This would be good to do to see
  * someone's progress with tickets
  * 
  * @param type $uid
  * @return boolean
  */
 public function getTicketResponseByUid($uid)
 {
     $q = 'SELECT ' . $this->fields . ' FROM ticketResponses WHERE uid = :uid';
     $this->stmt = $this->db->prepare($q);
     $this->stmt->bindParam(':uid', $uid, \PDO::PARAM_INT);
     $this->stmt->execute();
     $data = $this->stmt->fetch(\PDO::FETCH_ASSOC);
     if ($this->stmt->rowCount() > 0) {
         parent::setData($data);
         return true;
     } else {
         return false;
     }
 }
コード例 #2
0
ファイル: TicketRoot.php プロジェクト: wappr/ticklr
 /**
  * Retrieves all of a user's ticket.
  * 
  * @param int $uid ID of the user
  * @return bool
  */
 public function getTicketRootByUid($uid)
 {
     $q = 'SELECT * FROM ticketRoot WHERE uid = :uid and status != -1 LIMIT 1';
     $this->stmt = $this->db->prepare($q);
     $this->stmt->bindParam(':uid', $uid, \PDO::PARAM_INT);
     $this->stmt->execute();
     $data = $this->stmt->fetch(\PDO::FETCH_ASSOC);
     if ($this->stmt->rowCount() > 0) {
         parent::setData($data);
         return true;
     } else {
         return false;
     }
 }