mirror of
https://github.com/agdsn/ancient-weatherstation.git
synced 2026-06-19 23:07:59 +00:00
Database Opt
git-svn-id: file:///home/jan/tmp/wetterstation/trunk@245 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
@@ -326,7 +326,7 @@ pix_list_ptr get_pix_list(int c_width){
|
||||
}
|
||||
|
||||
/* Anfrage zusammenbauen */
|
||||
snprintf(query, BUFFSIZE, "SELECT round(date_part('epoch', current_timestamp))::int4 AS now, round(date_part('epoch', timestamp))::int4 AS times, %s AS val FROM %s WHERE sens_id=%d AND timestamp > (current_timestamp - INTERVAL '%d seconds') ORDER BY times ASC", img_cfg.table_field, table, img_cfg.sens_id, img_cfg.show_interval );
|
||||
snprintf(query, BUFFSIZE, "SELECT round(date_part('epoch', current_timestamp))::int4 AS now, round(date_part('epoch', timestamp))::int4 AS times, %s AS val FROM %s WHERE sens_id=%d AND timestamp > (select (current_timestamp - INTERVAL '%d seconds')) ORDER BY times ASC", img_cfg.table_field, table, img_cfg.sens_id, img_cfg.show_interval );
|
||||
|
||||
/* Anfrage stellen */
|
||||
res = pg_check_exec(conn, query, 1);
|
||||
|
||||
Reference in New Issue
Block a user