QuickBooks/Driver/Sql/Pgsql.php
protected function _fetch($res, $print = false)
	{
		$arr = pg_fetch_assoc($res);
		
		$booleans = array(
			QUICKBOOKS_DRIVER_SQL_FIELD_TO_SYNC,
			QUICKBOOKS_DRIVER_SQL_FIELD_TO_VOID,
			QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE,
			QUICKBOOKS_DRIVER_SQL_FIELD_TO_SKIP,
			QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_SKIPPED, 
			QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED,
			QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_VOIDED			
			);
		
		if ($arr)
		{
			foreach ($arr as $key => $value)
			{
				if (in_array($key, $booleans))
				{
					if ($value == 'f')
					{
						$value = false;
					}
					else if ($value == 't')
					{
						$value = true;
					}
					else
					{
						$value = null;
					}
					
					$arr[$key] = $value;
				}
			}
		}
		
		if (is_array($arr))
		{
			reset($arr);
		}
		
		/*
		if ($print)
		{
			print('{{');
			print_r($arr);
			die('}} OUTPUT STOP');
		}
		*/
		
		return $arr;
	}
protected function _fetch($res, $print = false)
	{
		$arr = pg_fetch_assoc($res);
		
		$booleans = array(
			QUICKBOOKS_DRIVER_SQL_FIELD_TO_SYNC,
			QUICKBOOKS_DRIVER_SQL_FIELD_TO_VOID,
			QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE,
			QUICKBOOKS_DRIVER_SQL_FIELD_TO_SKIP,
			QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_SKIPPED, 
			QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED,
			QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_VOIDED			
			);
		
		if ($arr)
		{
			foreach ($arr as $key => $value)
			{
				if (in_array($key, $booleans))
				{
					if ($value == 'f')
					{
						$value = false;
					}
					else if ($value == 't')
					{
						$value = true;
					}
					else
					{
						$value = null;
					}
					
					$arr[$key] = $value;
				}
			}
		}
		
		if (is_array($arr))
		{
			reset($arr);
		}
		
		/*
		if ($print)
		{
			print('{{');
			print_r($arr);
			die('}} OUTPUT STOP');
		}
		*/
		
		return $arr;
	}
Fetch an array from a database result set

@param resource $res
@return array