[horde] weather and metar problem
Rick Emery
rick at emery.homelinux.net
Thu Mar 4 06:08:48 PST 2004
Quoting Ilya <mail at krel.org>:
> Rick, as it seems weather works now, i am trying to get metar running.
> I have a question about this part of code:
> $dbString = $dbString . $conf['sql']['username'] . '@';
> $dbString = $dbString . $conf['sql']['hostspec'] . '/weather';
>
> what is the /weather for ? is that a table name? because i dont have tables
> called weather, i have metarlocations.
Wow, good catch! Somehow I *really* screwed this up. Here's a patch
that should
fix the DSN; can somebody check it for me?
Thanks,
Rick
-------------- next part --------------
Index: metar.php
===================================================================
RCS file: /repository/horde/lib/Block/metar.php,v
retrieving revision 1.15
diff -u -r1.15 metar.php
--- metar.php 19 Feb 2004 02:55:03 -0000 1.15
+++ metar.php 4 Mar 2004 14:04:51 -0000
@@ -116,9 +116,10 @@
require_once 'Services/Weather.php';
$metar = &Services_Weather::service('METAR', array('debug' => 0));
$dbString = $conf['sql']['phptype'] . '://';
- $dbString = $dbString . $conf['sql']['database'] . ':';
- $dbString = $dbString . $conf['sql']['username'] . '@';
- $dbString = $dbString . $conf['sql']['hostspec'] . '/weather';
+ $dbString .= $conf['sql']['username'] . ':';
+ $dbString .= $conf['sql']['password'] . '@';
+ $dbString .= $conf['sql']['hostspec'] . '/';
+ $dbString .= $conf['sql']['database'];
$metar->setMetarDB($dbString);
$metar->setUnitsFormat($this->_params['units']);
$metar->setDateTimeFormat('M j, Y', 'H:i');
More information about the horde
mailing list