summaryrefslogtreecommitdiff
path: root/ebus/webapp/__init__.py
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2011-07-23 20:21:31 +0200
committeryvesf <yvesf-git@xapek.org>2011-07-23 20:21:31 +0200
commit43879604d0de3c9d2361d89ae09860e9e2e984f3 (patch)
treeb6524a06ca9b3ebbb52f2474469b37af3db8cd90 /ebus/webapp/__init__.py
parentf85f93c6dda345321e821220f0a2b801194711dd (diff)
downloadebus-alt-43879604d0de3c9d2361d89ae09860e9e2e984f3.tar.gz
ebus-alt-43879604d0de3c9d2361d89ae09860e9e2e984f3.zip
korrigiere ORDRE BY für einzelne werte
Diffstat (limited to 'ebus/webapp/__init__.py')
-rw-r--r--ebus/webapp/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ebus/webapp/__init__.py b/ebus/webapp/__init__.py
index cd5de8c..2a92b57 100644
--- a/ebus/webapp/__init__.py
+++ b/ebus/webapp/__init__.py
@@ -43,7 +43,7 @@ def sensor_data(name):
s = text("""SELECT timestamp, COALESCE(value_int, value_float) as "value_real"
FROM value
WHERE sensor_id = :sensor_id
- ORDER BY timestamp
+ ORDER BY timestamp DESC
LIMIT 1""")
value = conn.execute(s, sensor_id=sensor_id).first()