protected function _queueLeft($user, $queued = true)
	{
		$errnum = 0;
		$errmsg = '';

		// SELECT * FROM quickbooks_queue WHERE qb_status = 'q'
		$sql = "
			SELECT
				COUNT(*) AS num_left
			FROM
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) . "
			WHERE
				qb_username = '" . $this->_escape($user) . "' ";

		if ($queued)
		{
			$sql .= " AND qb_status = '" . QUICKBOOKS_STATUS_QUEUED . "' ";
		}

		$arr = $this->_fetch($this->_query($sql, $errnum, $errmsg));

		return $arr['num_left'];
	}
protected function _queueLeft($user, $queued = true)
	{
		$errnum = 0;
		$errmsg = '';

		// SELECT * FROM quickbooks_queue WHERE qb_status = 'q'
		$sql = "
			SELECT
				COUNT(*) AS num_left
			FROM
				" . $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) . "
			WHERE
				qb_username = '" . $this->_escape($user) . "' ";

		if ($queued)
		{
			$sql .= " AND qb_status = '" . QUICKBOOKS_STATUS_QUEUED . "' ";
		}

		$arr = $this->_fetch($this->_query($sql, $errnum, $errmsg));

		return $arr['num_left'];
	}
protected function _queueLeft ( $ user , $ queued = true ) { $ errnum = 0 ; $ errmsg = '' ; // SELECT * FROM quickbooks_queue WHERE qb_status = 'q' $ sql = "
			SELECT
				COUNT(*) AS num_left
			FROM
				" . $ this -> _mapTableName ( QUICKBOOKS_DRIVER_SQL_QUEUETABLE ) . "
			WHERE
				qb_username = '" . $ this -> _escape ( $ user ) . "' " ; if ( $ queued ) { $ sql .= " AND qb_status = '" . QUICKBOOKS_STATUS_QUEUED . "' " ; } $ arr = $ this -> _fetch ( $ this -> _query ( $ sql , $ errnum , $ errmsg ) ) ; return $ arr [ 'num_left' ] ; }
Tell how many items are in the queue

@return integer
Tell how many items are in the queue