changeset 8:e3d2b5500b53 default tip

Missed part of earlier commit to only print the query if -vv is used as well as compiling in the mysql stuff (now that I know -n DTRT)
author Daniel O'Connor <darius@dons.net.au>
date Thu, 11 Feb 2010 12:48:57 +1030
parents 9a14029b3782
children
files wh1080.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/wh1080.c	Thu Feb 11 12:47:59 2010 +1030
+++ b/wh1080.c	Thu Feb 11 12:48:57 2010 +1030
@@ -526,7 +526,6 @@
            readings->wind_direction_text,
            readings->rain - db_previous_rain );
   db_previous_rain = readings->rain;            /* update our current rainfall XXX fix this */
-#if 0
   if (update)                                   /* only if updates set */
   {
     if (mysql_query (mysql, mysql_querytext))
@@ -537,8 +536,8 @@
                mysql_errno (mysql) );
     }
   }
-  else if (verbose)
-#endif
+  else if (verbose > 1)
+    puts (mysql_querytext);
 }
 
 /*