QuickBooks/Driver/Sql/Mysql.php
protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null)
	{
		if ($limit)
		{
			if ($offset)
			{
				$sql .= " LIMIT " . (int) $offset . ", " . (int) $limit;
			}
			else
			{
				$sql .= " LIMIT " . (int) $limit;
			}
		}
		else if ($offset)
		{
			// @todo Should this be implemented...?
		}
		
		//print($sql . "\n\n");
		$res = mysql_query($sql, $this->_conn);
		//mysql_query("INSERT INTO quickbooks_log ( msg, log_datetime ) VALUES ( '" . mysql_real_escape_string($sql) . "', NOW() ) ");
		
		/*
		CREATE TABLE quickbooks_debug (
		  quickbooks_debug_id int(10) unsigned NOT NULL AUTO_INCREMENT,
		  msg text NOT NULL,
		  debug_datetime datetime NOT NULL,
		  PRIMARY KEY (quickbooks_debug_id)
		) ENGINE=MyISAM
		*/
		
		// Debugging... 
		/*
		mysql_query("
			INSERT INTO
				quickbooks_debug
			(
				msg, 
				debug_datetime 
			)
			VALUES
			(
				'" . $this->_escape($sql) . "', 
				NOW() 
			)");
		*/
		
		if (!$res)
		{
			$errnum = mysql_errno($this->_conn);
			$errmsg = mysql_error($this->_conn);
			
			//print($sql);
			
			trigger_error('Error Num.: ' . $errnum . "\n" . 'Error Msg.:' . $errmsg . "\n" . 'SQL: ' . $sql, E_USER_ERROR);
			return false;
		}
		
		return $res;
	}
protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null)
	{
		if ($limit)
		{
			if ($offset)
			{
				$sql .= " LIMIT " . (int) $offset . ", " . (int) $limit;
			}
			else
			{
				$sql .= " LIMIT " . (int) $limit;
			}
		}
		else if ($offset)
		{
			// @todo Should this be implemented...?
		}
		
		//print($sql . "\n\n");
		$res = mysql_query($sql, $this->_conn);
		//mysql_query("INSERT INTO quickbooks_log ( msg, log_datetime ) VALUES ( '" . mysql_real_escape_string($sql) . "', NOW() ) ");
		
		/*
		CREATE TABLE quickbooks_debug (
		  quickbooks_debug_id int(10) unsigned NOT NULL AUTO_INCREMENT,
		  msg text NOT NULL,
		  debug_datetime datetime NOT NULL,
		  PRIMARY KEY (quickbooks_debug_id)
		) ENGINE=MyISAM
		*/
		
		// Debugging... 
		/*
		mysql_query("
			INSERT INTO
				quickbooks_debug
			(
				msg, 
				debug_datetime 
			)
			VALUES
			(
				'" . $this->_escape($sql) . "', 
				NOW() 
			)");
		*/
		
		if (!$res)
		{
			$errnum = mysql_errno($this->_conn);
			$errmsg = mysql_error($this->_conn);
			
			//print($sql);
			
			trigger_error('Error Num.: ' . $errnum . "\n" . 'Error Msg.:' . $errmsg . "\n" . 'SQL: ' . $sql, E_USER_ERROR);
			return false;
		}
		
		return $res;
	}
Query the database

@param string $sql
@return resource