protected function _recurDequeue($user, $by_priority = false)
	{
		$errnum = 0;
		$errmsg = '';

		$sql = "
			SELECT
				*
			FROM
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) . "
			WHERE
				qb_username = '" . $this->_escape($user) . "' AND
				recur_lasttime + run_every <= " . time();

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

		if ($arr = $this->_fetch($this->_query($sql . ' ', $errnum, $errmsg, 0, 1)))
		{
			// Update it, so it doesn't get fetched again until it's supposed to
			$errnum = 0;
			$errmsg = '';
			$this->_query("UPDATE " . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) . " SET recur_lasttime = " . time() . " WHERE quickbooks_recur_id = " . $arr['quickbooks_recur_id'], $errnum, $errmsg);

			return $arr;
		}

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

		$sql = "
			SELECT
				*
			FROM
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) . "
			WHERE
				qb_username = '" . $this->_escape($user) . "' AND
				recur_lasttime + run_every <= " . time();

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

		if ($arr = $this->_fetch($this->_query($sql . ' ', $errnum, $errmsg, 0, 1)))
		{
			// Update it, so it doesn't get fetched again until it's supposed to
			$errnum = 0;
			$errmsg = '';
			$this->_query("UPDATE " . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) . " SET recur_lasttime = " . time() . " WHERE quickbooks_recur_id = " . $arr['quickbooks_recur_id'], $errnum, $errmsg);

			return $arr;
		}

		return false;
	}
protected function _recurDequeue ( $ user , $ by_priority = false ) { $ errnum = 0 ; $ errmsg = '' ; $ sql = "
			SELECT
				*
			FROM
				" . $ this -> _mapTableName ( QUICKBOOKS_DRIVER_SQL_RECURTABLE ) . "
			WHERE
				qb_username = '" . $ this -> _escape ( $ user ) . "' AND
				recur_lasttime + run_every <= " . time ( ) ; if ( $ by_priority ) { $ sql .= ' ORDER BY priority DESC ' ; } if ( $ arr = $ this -> _fetch ( $ this -> _query ( $ sql . ' ' , $ errnum , $ errmsg , 0 , 1 ) ) ) { // Update it, so it doesn't get fetched again until it's supposed to $ errnum = 0 ; $ errmsg = '' ; $ this -> _query ( "UPDATE " . $ this -> _mapTableName ( QUICKBOOKS_DRIVER_SQL_RECURTABLE ) . " SET recur_lasttime = " . time ( ) . " WHERE quickbooks_recur_id = " . $ arr [ 'quickbooks_recur_id' ] , $ errnum , $ errmsg ) ; return $ arr ; } return false ; }
Dequeue a recurring even that is schedule to be run

@param string $user
@param boolean $by_priority
@return array
Dequeue a recurring even that is schedule to be run