Keeping Mears in Database
Brought to you by:
iridium
From: Klaus D. <kla...@gm...> - 2003-04-05 21:59:06
|
Hi all, thanks for puting phpweather to work! Perhaps someone can give me a hint as I am not a great programmer. When running phpweather it 'overrides' teh metar per station, but I like to keep a history to see how weather changes, how good or bad last summer was. I digged around a bit in the coding. In 'data_retrieval.php' teh metar data are either inserted or updated (depending whether $icao already exist). The first try was simply to replace the method 'update' with 'insert' what failed as no unique index exist. I then modiefied the table settings to have 'timestamp' as part of the primary key. But even then an error for duplicate record occurs. Is there a quick workaround to keep the old metars? Or do I have to adjust db/pw_db_mysql.php and subsequently date_retrieval.php to have a fourth column with the actual system time as part of the key? Cheers, Klaus |