Update of /cvsroot/perfparse/_perfparse/cgi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28012/cgi
Modified Files:
perfchart.c
Log Message:
ctime is now a unix timestamp
Index: perfchart.c
===================================================================
RCS file: /cvsroot/perfparse/_perfparse/cgi/perfchart.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** perfchart.c 31 May 2007 14:58:31 -0000 1.10
--- perfchart.c 1 Jun 2007 08:51:05 -0000 1.11
***************
*** 359,363 ****
#ifdef USE_DB_MYSQL
! g_string_printf(s_SQL, "SELECT UNIX_TIMESTAMP(ctime), value, warn, critical FROM perfdata_service_bin WHERE metric_id = %d",
sMetricId);
#elif defined USE_DB_POSTGRESQL
--- 359,363 ----
#ifdef USE_DB_MYSQL
! g_string_printf(s_SQL, "SELECT ctime, value, warn, critical FROM perfdata_service_bin WHERE metric_id = %d",
sMetricId);
#elif defined USE_DB_POSTGRESQL
***************
*** 365,370 ****
sMetricId);
#endif
! g_string_append_printf(s_SQL, " AND ctime BETWEEN '%s' AND '%s' ORDER BY ctime",
! sFrom, sTo);
/* Note:- Not using standard cursor. That loads everything into memory, too heavey. */
--- 365,370 ----
sMetricId);
#endif
! g_string_append_printf(s_SQL, " AND ctime BETWEEN %ld AND %ld ORDER BY ctime",
! tFrom, tTo);
/* Note:- Not using standard cursor. That loads everything into memory, too heavey. */
|