Update of /cvsroot/phpweather/phpweather/db
In directory usw-pr-cvs1:/tmp/cvs-serv17167
Modified Files:
pw_db_common.php
Log Message:
A flush() here should make the output even better :-)
Index: pw_db_common.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/pw_db_common.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- pw_db_common.php 25 Mar 2002 23:33:29 -0000 1.7
+++ pw_db_common.php 25 Mar 2002 23:50:10 -0000 1.8
@@ -77,7 +77,6 @@
$fp = fopen($file, 'r');
- $i = 0;
$inserted = 0;
$updated = 0;
@@ -111,13 +110,16 @@
$inserted++;
}
- if ($i % 100 == 0) {
+ if (($inserted + $updated) % 100 == 0) {
printf("Inserted %6d new METARs, updated %6d METARs...\n",
$inserted, $updated);
+ flush();
}
- $i++;
} /* while (!feof($fp)) */
+
+ printf("Inserted %6d new METARs, updated %6d METARs...\n",
+ $inserted, $updated);
fclose($fp);
}
|