QuickBooks/Driver/Sql.php
protected function _queueEnqueue($user, $action, $ident, $replace = true, $priority = 0, $extra = null, $qbxml = null)
	{
		$errnum = 0;
		$errmsg = '';

		if ($replace)
		{
			$this->_query("
				DELETE FROM
					" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) . "
				WHERE
					qb_username = '" . $this->_escape($user) . "' AND
					qb_action = '" . $this->_escape($action) . "' AND
					ident = '" . $this->_escape($ident) . "' AND
					qb_status = '" . QUICKBOOKS_STATUS_QUEUED . "' ", $errnum, $errmsg);
		}

		if ($extra)
		{
			$extra = serialize($extra);
		}

		return $this->_query("
			INSERT INTO
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) . "
			(
				qb_username,
				qb_action,
				ident,
				extra,
				qbxml,
				priority,
				qb_status,
				enqueue_datetime
			) VALUES (
				'" . $this->_escape($user) . "',
				'" . $this->_escape($action) . "',
				'" . $this->_escape($ident) . "',
				'" . $this->_escape($extra) . "',
				'" . $this->_escape($qbxml) . "',
				" . (int) $priority . ",
				'" . QUICKBOOKS_STATUS_QUEUED . "',
				'" . date('Y-m-d H:i:s') . "'
			) ", $errnum, $errmsg);
	}
protected function _queueEnqueue($user, $action, $ident, $replace = true, $priority = 0, $extra = null, $qbxml = null)
	{
		$errnum = 0;
		$errmsg = '';

		if ($replace)
		{
			$this->_query("
				DELETE FROM
					" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) . "
				WHERE
					qb_username = '" . $this->_escape($user) . "' AND
					qb_action = '" . $this->_escape($action) . "' AND
					ident = '" . $this->_escape($ident) . "' AND
					qb_status = '" . QUICKBOOKS_STATUS_QUEUED . "' ", $errnum, $errmsg);
		}

		if ($extra)
		{
			$extra = serialize($extra);
		}

		return $this->_query("
			INSERT INTO
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) . "
			(
				qb_username,
				qb_action,
				ident,
				extra,
				qbxml,
				priority,
				qb_status,
				enqueue_datetime
			) VALUES (
				'" . $this->_escape($user) . "',
				'" . $this->_escape($action) . "',
				'" . $this->_escape($ident) . "',
				'" . $this->_escape($extra) . "',
				'" . $this->_escape($qbxml) . "',
				" . (int) $priority . ",
				'" . QUICKBOOKS_STATUS_QUEUED . "',
				'" . date('Y-m-d H:i:s') . "'
			) ", $errnum, $errmsg);
	}
Add an item to the queue

@param string $action
@param mixed $ident
@return boolean