Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv29403
Modified Files:
db_updater.php
Log Message:
It seams that I cannot make the connection to the DBA database.
Index: db_updater.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db_updater.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- db_updater.php 25 Mar 2002 20:20:17 -0000 1.5
+++ db_updater.php 25 Mar 2002 20:58:08 -0000 1.6
@@ -30,7 +30,12 @@
require_once(PHPWEATHER_BASE_DIR . '/db_layer.php');
$db = new db_layer(array());
-$db->db->connect();
-$db->db->update_all_metars($fn);
+if ($db->db->connect()) {
+ $db->db->update_all_metars($fn);
+ exit(0);
+} else {
+ echo "An error occurred while connecting to the database!\n";
+ exit(1);
+}
?>
|