QuickBooks/Driver/Sql.php
protected function _ticketResolve($ticket)
	{
		static $cache = array();

		if (!$ticket)
		{
			return 0;
		}

		$errnum = 0;
		$errmsg = '';

		if (isset($cache[$ticket]))
		{
			return $cache[$ticket];
		}
		else if ($arr = $this->_fetch($this->_query("
			SELECT
				quickbooks_ticket_id
			FROM
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) . "
			WHERE
				ticket = '" . $this->_escape($ticket) . "' ", $errnum, $errmsg, 0, 1)))
		{
			$cache[$ticket] = $arr['quickbooks_ticket_id'];

			return $arr['quickbooks_ticket_id'];
		}

		return 0;
	}
protected function _ticketResolve($ticket)
	{
		static $cache = array();

		if (!$ticket)
		{
			return 0;
		}

		$errnum = 0;
		$errmsg = '';

		if (isset($cache[$ticket]))
		{
			return $cache[$ticket];
		}
		else if ($arr = $this->_fetch($this->_query("
			SELECT
				quickbooks_ticket_id
			FROM
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) . "
			WHERE
				ticket = '" . $this->_escape($ticket) . "' ", $errnum, $errmsg, 0, 1)))
		{
			$cache[$ticket] = $arr['quickbooks_ticket_id'];

			return $arr['quickbooks_ticket_id'];
		}

		return 0;
	}
Resolve a ticket string back to a ticket ID number

@param string $ticket
@return integer