diff --git a/api_app.py b/api_app.py index de0a777..0e20777 100644 --- a/api_app.py +++ b/api_app.py @@ -80,7 +80,7 @@ def select_frames(conn, n, url_params): cur = conn.cursor() # Workaround to deal with missing value in WHERE field_where_query = "" if field_where_str == "" else "WHERE "+field_where_str - sql = 'SELECT * FROM frames {field_where_query} ORDER BY created DESC LIMIT {n}'.format(field_where_query=field_where_query, n=n) + sql = 'SELECT * FROM frames {field_where_query} ORDER BY id DESC LIMIT {n}'.format(field_where_query=field_where_query, n=n) print(sql) cur.execute(sql) rows = cur.fetchall()