Mercurial > ~darius > hgwebdir.cgi > wh1080
comparison wh1080.c @ 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 |
comparison
equal
deleted
inserted
replaced
7:9a14029b3782 | 8:e3d2b5500b53 |
---|---|
524 readings->wind_gust, | 524 readings->wind_gust, |
525 readings->wind_direction, | 525 readings->wind_direction, |
526 readings->wind_direction_text, | 526 readings->wind_direction_text, |
527 readings->rain - db_previous_rain ); | 527 readings->rain - db_previous_rain ); |
528 db_previous_rain = readings->rain; /* update our current rainfall XXX fix this */ | 528 db_previous_rain = readings->rain; /* update our current rainfall XXX fix this */ |
529 #if 0 | |
530 if (update) /* only if updates set */ | 529 if (update) /* only if updates set */ |
531 { | 530 { |
532 if (mysql_query (mysql, mysql_querytext)) | 531 if (mysql_query (mysql, mysql_querytext)) |
533 { | 532 { |
534 fprintf (stderr, | 533 fprintf (stderr, |
535 "Can't insert database record: %s (%d)\n", | 534 "Can't insert database record: %s (%d)\n", |
536 mysql_error (mysql), | 535 mysql_error (mysql), |
537 mysql_errno (mysql) ); | 536 mysql_errno (mysql) ); |
538 } | 537 } |
539 } | 538 } |
540 else if (verbose) | 539 else if (verbose > 1) |
541 #endif | 540 puts (mysql_querytext); |
542 } | 541 } |
543 | 542 |
544 /* | 543 /* |
545 * Check if we have missed any updates since we last ran. | 544 * Check if we have missed any updates since we last ran. |
546 * | 545 * |