}
GdaDataModel
-*territorio_comuni_get_dm (TerritorioCommons *commons, gboolean con_provincia, const gchar *where)
+*territorio_comuni_get_dm_order (TerritorioCommons *commons, gboolean con_provincia, const gchar *where, const gchar *order)
{
GdaDataModel *dm;
NULL);
g_value_unset (gval);
- sql = g_strdup_printf ("SELECT %s FROM %s WHERE %s%s",
+ sql = g_strdup_printf ("SELECT %s FROM %s WHERE %s%s%s",
gdaex_sql_builder_get_sql_select (sqlb, NULL, NULL),
gdaex_sql_builder_get_sql_from (sqlb, NULL, NULL),
gdaex_sql_builder_get_sql_where (sqlb, NULL, NULL),
- where != NULL ? where : "");
+ where != NULL ? where : "",
+ order != NULL ? g_strdup_printf (" ORDER BY %s", order) : "");
dm = gdaex_query (commons->gdaex, sql);
g_free (sql);
return dm;
}
+GdaDataModel
+*territorio_comuni_get_dm (TerritorioCommons *commons, gboolean con_provincia, const gchar *where)
+{
+ territorio_comuni_get_dm_order (commons, con_provincia, where, NULL);
+}
+
/* PRIVATE */
static void
territorio_comuni_carica (TerritorioComuni *territorio_comuni)
GtkWidget *territorio_comuni_get_widget (TerritorioComuni *territorio_comuni);
GdaDataModel *territorio_comuni_get_dm (TerritorioCommons *commons, gboolean con_provincia, const gchar *where);
+GdaDataModel *territorio_comuni_get_dm_order (TerritorioCommons *commons, gboolean con_provincia, const gchar *where, const gchar *order);
G_END_DECLS