QuickBooks/Driver/Sql.php
protected function _queueDequeue($user, $by_priority = false)
	{
		$errnum = 0;
		$errmsg = '';

		$sql = "
			SELECT
				*
			FROM
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) . "
			WHERE
				qb_username = '" . $this->_escape($user) . "' AND
				qb_status = '" . QUICKBOOKS_STATUS_QUEUED . "' ";

		if ($by_priority)
		{
			$sql .= ' ORDER BY priority DESC, ident ASC ';
		}

		return $this->_fetch($this->_query($sql, $errnum, $errmsg, 0, 1));
	}
protected function _queueDequeue($user, $by_priority = false)
	{
		$errnum = 0;
		$errmsg = '';

		$sql = "
			SELECT
				*
			FROM
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) . "
			WHERE
				qb_username = '" . $this->_escape($user) . "' AND
				qb_status = '" . QUICKBOOKS_STATUS_QUEUED . "' ";

		if ($by_priority)
		{
			$sql .= ' ORDER BY priority DESC, ident ASC ';
		}

		return $this->_fetch($this->_query($sql, $errnum, $errmsg, 0, 1));
	}
Remove an item from the queue

@param string $user
@param boolean $by_priority
@return array