示例#1
0
文件: Sql.php 项目: jubinpatel/horde
 /**
  * Returns a ticket state.
  *
  * @param integer $ticket_id  A ticket ID.
  *
  * @return integer  A state ID.
  * @throws Whups_Exception
  */
 public function getTicketState($ticket_id)
 {
     try {
         return $this->_db->SelectOne('SELECT whups_tickets.state_id, whups_states.state_category ' . 'FROM whups_tickets INNER JOIN whups_states ' . 'ON whups_tickets.state_id = whups_states.state_id ' . 'WHERE ticket_id = ?', array($ticket_id));
     } catch (Horde_Db_Exception $e) {
         throw new Whups_Exception($e);
     }
 }