CVS: phpweather/db pw_db_common.php,1.4,1.5
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2002-03-25 21:09:33
|
Update of /cvsroot/phpweather/phpweather/db In directory usw-pr-cvs1:/tmp/cvs-serv1252/db Modified Files: pw_db_common.php Log Message: We need more debug-output... Index: pw_db_common.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_common.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- pw_db_common.php 25 Mar 2002 20:38:12 -0000 1.4 +++ pw_db_common.php 25 Mar 2002 21:09:28 -0000 1.5 @@ -77,6 +77,8 @@ $fp = fopen($file, 'r'); + $i = 0; + while (!feof($fp)) { $line = trim(fgets($fp, 256)); @@ -104,6 +106,11 @@ } else { $this->insert_metar($icao, addslashes($metar), $timestamp); } + + if ($i % 100 == 0) { + $this->debug("Inserted $i METARs..."); + } + $i++ } /* while (!feof($fp)) */ |