[GRASS-SVN] r49291 - grass/trunk/temporal/t.list

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 18 06:14:54 EST 2011


Author: huhabla
Date: 2011-11-18 03:14:54 -0800 (Fri, 18 Nov 2011)
New Revision: 49291

Modified:
   grass/trunk/temporal/t.list/t.list.py
Log:
Wrong order - where positioning in the sql string


Modified: grass/trunk/temporal/t.list/t.list.py
===================================================================
--- grass/trunk/temporal/t.list/t.list.py	2011-11-18 08:02:57 UTC (rev 49290)
+++ grass/trunk/temporal/t.list/t.list.py	2011-11-18 11:14:54 UTC (rev 49291)
@@ -24,7 +24,7 @@
 #%option
 #% key: type
 #% type: string
-#% description: Type of the space time dataset, default is strds
+#% description: Type of the space time dataset or map, default is strds
 #% required: no
 #% options: strds, str3ds, stvds, rast, rast3d, vect
 #% answer: strds
@@ -36,17 +36,17 @@
 #% description: Sort the space time dataset by category. Columns number_of_maps and granularity only available fpr space time datasets
 #% required: no
 #% multiple: yes
-#% options: id, name, creator, mapset, number_of_maps, creation_time, modification_time, start_time, end_time, interval, north, south, west, east, granularity
+#% options: id, name, creator, mapset, number_of_maps, creation_time, start_time, end_time, interval, north, south, west, east, granularity
 #% answer: id
 #%end
 
 #%option
 #% key: columns
 #% type: string
-#% description: Which columns should be printed to stdout. Columns number_of_maps and granularity only available fpr space time datasets
+#% description: Which columns should be printed to stdout. Columns number_of_maps and granularity only available for space time datasets
 #% required: no
 #% multiple: yes
-#% options: id, name, creator, mapset, number_of_maps, creation_time, modification_time, revision, start_time, end_time, north, south, west, east, granularity, all
+#% options: id, name, creator, mapset, number_of_maps, creation_time, start_time, end_time, north, south, west, east, granularity, all
 #% answer: id
 #%end
 
@@ -116,11 +116,12 @@
     else:
         sql = "SELECT * FROM " + table
 
+    if where:
+        sql += " WHERE " + where
+
     if order:
         sql += " ORDER BY " + order
 
-    if where:
-        sql += " WHERE " + where
 
     dbif.cursor.execute(sql)
     rows = dbif.cursor.fetchall()



More information about the grass-commit mailing list