Re: Using DB to cache METARs ?
Brought to you by:
iridium
From: Martin G. <gim...@gi...> - 2004-01-04 23:26:05
|
Phil Pierotti <phi...@sw...> writes: > Just to be clear, by this you mean you've fixed the timestamping/cache > problem for MySQL and the NULL database? Yes, I basically disabeled the code that played with the timestamps. The problem is that Etienne wanted to add support for caching METARs and also TAF reports --- which is a fine idea! But a METAR report has a timefield which only contains the current day of month together with the time of day. The present code always uses the current month as a basis, but with old archived METARs this wont work anymore. So the code was changed to try and work around this lack of a full timestamp, but unfortunately the result was a bit messy with some timestamps being of the form YYYYMMDDhhmmss and other timestamps being a standard Unix timestamp counting the number of seconds since Jan 1st 1970. The code now works as it used to --- that is, the archiving of METAR reports is probably broken, I don't know for I've never used it. All I know is that it has to be reimplemented some other way. Could anybody do a CVS update and confirm that things work at least using MySQL and the null db backend? If somebody uses PostgreSQL then it would be cool to get a report about that too! > In that case, did you see my other post about issues getting MySQL > access to work? > > [ after much actually reading the configuration page, I realized I > needed to physically (ie manually) copy the defaults file to my > phpweather (eg in order to enable debug) -sigh- obviously not enough > coffee yesterday] :-) But you're right, it might not be exactly what people expect from the configuration builder --- but then again, making a configuration generator that writes to the files would be dangerous, and also require people to setup proper permissions for the files. But they still have to do this if they want to use the DBA db backend, so perhaps I'm wrong... > DEBUG=everything shows me: > > Fatal error: SQL-statement failed: CREATE TABLE pw_metars( icao > char(4) NOT NULL, time timestamp(14), metar varchar(255) NOT NULL, > timestamp timestamp(14), PRIMARY KEY (icao) MySQL said You have an > error in your SQL syntax near '' at line 6 (1064). Yes, I've fixed those errors too --- the SQL statements lacks the final right parenthesis... -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather: Shows the current weather on your webpage and PHP Shell: A telnet-connection (almost :-) in a PHP page. |