QuickBooks/Driver/Sql.php
protected function _errorLast($ticket)
	{
		$errnum = 0;
		$errmsg = '';

		if ($ticket_id = $this->_ticketResolve($ticket))
		{
			if ($arr = $this->_fetch($this->_query("SELECT lasterror_num, lasterror_msg FROM " . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) . " WHERE quickbooks_ticket_id = '" . $ticket_id . "' ", $errnum, $errmsg, 0, 1)))
			{
				if ($arr['lasterror_msg'] == QUICKBOOKS_NOOP)
				{
					return QUICKBOOKS_NOOP;
				}

				return $arr['lasterror_num'] . ': ' . $arr['lasterror_msg'];
			}
		}

		return 'Error fetching last error.';
	}
protected function _errorLast($ticket)
	{
		$errnum = 0;
		$errmsg = '';

		if ($ticket_id = $this->_ticketResolve($ticket))
		{
			if ($arr = $this->_fetch($this->_query("SELECT lasterror_num, lasterror_msg FROM " . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) . " WHERE quickbooks_ticket_id = '" . $ticket_id . "' ", $errnum, $errmsg, 0, 1)))
			{
				if ($arr['lasterror_msg'] == QUICKBOOKS_NOOP)
				{
					return QUICKBOOKS_NOOP;
				}

				return $arr['lasterror_num'] . ': ' . $arr['lasterror_msg'];
			}
		}

		return 'Error fetching last error.';
	}
Retreive the last error message which occured for a given ticket (session)

@param string $ticket
@return string