protected function _queueProcessing($user)
	{
		$errnum = 0;
		$errmsg = '';

		// Fetch the latest record to be dequeued for this user, and check that it's set with a status of in processing
		$sql = "
			SELECT
				quickbooks_queue_id,
				qb_action,
				ident,
				qb_status,
				dequeue_datetime
			FROM
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) . "
			WHERE
				dequeue_datetime IS NOT NULL
			ORDER BY
				dequeue_datetime DESC ";

		$res = $this->_query($sql, $errnum, $errmsg, 0, 1);
		if ($arr = $this->_fetch($res) and
			$arr['qb_status'] == QUICKBOOKS_STATUS_PROCESSING and 					// Make sure this was the last thing we tried to process...
			time() - strtotime($arr['dequeue_datetime']) < QUICKBOOKS_TIMEOUT)		// ... and it occurred during a reasonably recent run
		{
			return $this->_queueGet($user, $arr['quickbooks_queue_id'], QUICKBOOKS_STATUS_PROCESSING);
			//return $this->_queueFetch($user, $arr['qb_action'], $arr['ident'], QUICKBOOKS_STATUS_PROCESSING);
		}

		return false;
	}
protected function _queueProcessing($user)
	{
		$errnum = 0;
		$errmsg = '';

		// Fetch the latest record to be dequeued for this user, and check that it's set with a status of in processing
		$sql = "
			SELECT
				quickbooks_queue_id,
				qb_action,
				ident,
				qb_status,
				dequeue_datetime
			FROM
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) . "
			WHERE
				dequeue_datetime IS NOT NULL
			ORDER BY
				dequeue_datetime DESC ";

		$res = $this->_query($sql, $errnum, $errmsg, 0, 1);
		if ($arr = $this->_fetch($res) and
			$arr['qb_status'] == QUICKBOOKS_STATUS_PROCESSING and 					// Make sure this was the last thing we tried to process...
			time() - strtotime($arr['dequeue_datetime']) < QUICKBOOKS_TIMEOUT)		// ... and it occurred during a reasonably recent run
		{
			return $this->_queueGet($user, $arr['quickbooks_queue_id'], QUICKBOOKS_STATUS_PROCESSING);
			//return $this->_queueFetch($user, $arr['qb_action'], $arr['ident'], QUICKBOOKS_STATUS_PROCESSING);
		}

		return false;
	}
protected function _queueProcessing ( $ user ) { $ errnum = 0 ; $ errmsg = '' ; // Fetch the latest record to be dequeued for this user, and check that it's set with a status of in processing $ sql = "
			SELECT
				quickbooks_queue_id,
				qb_action,
				ident,
				qb_status,
				dequeue_datetime
			FROM
				" . $ this -> _mapTableName ( QUICKBOOKS_DRIVER_SQL_QUEUETABLE ) . "
			WHERE
				dequeue_datetime IS NOT NULL
			ORDER BY
				dequeue_datetime DESC " ; $ res = $ this -> _query ( $ sql , $ errnum , $ errmsg , 0 , 1 ) ; if ( $ arr = $ this -> _fetch ( $ res ) and $ arr [ 'qb_status' ] == QUICKBOOKS_STATUS_PROCESSING and // Make sure this was the last thing we tried to process... time ( ) - strtotime ( $ arr [ 'dequeue_datetime' ] ) < QUICKBOOKS_TIMEOUT ) // ... and it occurred during a reasonably recent run { return $ this -> _queueGet ( $ user , $ arr [ 'quickbooks_queue_id' ] , QUICKBOOKS_STATUS_PROCESSING ) ; //return $this->_queueFetch($user, $arr['qb_action'], $arr['ident'], QUICKBOOKS_STATUS_PROCESSING); } return false ; }
Fetch the queue item currently being processed by QuickBooks

@param string $user
@return array
Fetch the queue item currently being processed by QuickBooks