Update of /cvsroot/phpweather/phpweather/db
In directory usw-pr-cvs1:/tmp/cvs-serv31779
Modified Files:
db_mysql.php
Log Message:
Applied patch from Max Hammond - thanks a lot!
Index: db_mysql.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/db_mysql.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- db_mysql.php 2001/07/17 12:07:48 1.4
+++ db_mysql.php 2001/12/18 21:52:00 1.5
@@ -161,7 +161,7 @@
* @see update_metar()
*/
function insert_metar($icao, $metar, $timestamp) {
- $this->query("INSERT INTO metars SET icao = '$icao', metar = '$metar', timestamp = FROM_UNIXTIME($timestamp)");
+ $this->query("INSERT INTO " . $this->properties['db_metars'] . " SET icao = '$icao', metar = '$metar', timestamp = FROM_UNIXTIME($timestamp)");
}
@@ -175,7 +175,7 @@
* @see insert_metar()
*/
function update_metar($icao, $metar, $timestamp) {
- $this->query("UPDATE metars SET metar = '$metar', timestamp = FROM_UNIXTIME($timestamp) WHERE icao = '$icao'");
+ $this->query("UPDATE " . $this->properties['db_metars'] . " SET metar = '$metar', timestamp = FROM_UNIXTIME($timestamp) WHERE icao = '$icao'");
}
@@ -187,7 +187,7 @@
* @access public
*/
function get_metar($icao) {
- $this->query("SELECT metar, UNIX_TIMESTAMP(timestamp) FROM metars WHERE icao = '$icao'");
+ $this->query("SELECT metar, UNIX_TIMESTAMP(timestamp) FROM " . $this->properties['db_metars'] . " WHERE icao = '$icao'");
return $this->fetch_row();
}
|