[mapserver-commits] r9644 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Dec 31 11:20:15 EST 2009
Author: aboudreault
Date: 2009-12-31 11:20:14 -0500 (Thu, 31 Dec 2009)
New Revision: 9644
Modified:
trunk/mapserver/maporaclespatial.c
Log:
Fixed oracle sql query generation problem when no items
Modified: trunk/mapserver/maporaclespatial.c
===================================================================
--- trunk/mapserver/maporaclespatial.c 2009-12-31 04:22:20 UTC (rev 9643)
+++ trunk/mapserver/maporaclespatial.c 2009-12-31 16:20:14 UTC (rev 9644)
@@ -1986,9 +1986,9 @@
}
if (existunique)
- sprintf( query_str, "SELECT");
+ sprintf( query_str, "SELECT ");
else
- sprintf( query_str, "SELECT %s,", unique );
+ sprintf( query_str, "SELECT %s, ", unique );
/* allocate enough space for items */
if (layer->numitems >= 0)
@@ -2013,9 +2013,9 @@
/* define SQL query */
for( i=0; i < layer->numitems; ++i )
- sprintf( query_str + strlen(query_str), "%s %s", (i!=0 ? ",":""),layer->items[i] );
+ sprintf( query_str + strlen(query_str), "%s, ", layer->items[i] );
- sprintf( query_str + strlen(query_str), ", %s FROM %s", geom_column_name, table_name );
+ sprintf( query_str + strlen(query_str), "%s FROM %s", geom_column_name, table_name );
osFilteritem(layer, function, query_str, 1);
More information about the mapserver-commits
mailing list