realtime to msql databae
Posted: Thu 15 Sep 2011 4:49 pm
Hi, Cam someone tell how to import te realtime file to a mysql data base. I have teste with te importcumulus log, but i dosen t work
Support forum for Cumulus weather station software
https://cumulus.hosiene.co.uk/
Not entirely sure what you tried -- but I am guessing you mean the ImportCumulusFile ? This is only written to import the dayfile or monthly log file but it can be adapted to import other file formats if you have some php skill.inaciovieira wrote:Hi, Cam someone tell how to import te realtime file to a mysql data base. I have teste with te importcumulus log, but i dosen t work
Code: Select all
if ($type == "monthly log")
{
$CreateQuery="CREATE TABLE " . $table_name . " (LogDate date NOT NULL ,HighWindGust decimal(4,1) NOT NULL ,HWindGBear varchar(4) NOT NULL ,THWindG varchar(5) NOT NULL ,MinTemp decimal(5,1) NOT NULL ,TMinTemp varchar(5) NOT NULL ,MaxTemp decimal(5,1) NOT NULL ,TMaxTemp varchar(5) NOT NULL ,MinPress decimal(6,2) NOT NULL ,TMinPress varchar(5) NOT NULL ,MaxPress decimal(6,2) NOT NULL ,TMaxPress varchar(5) NOT NULL ,MaxRainRate decimal(4,1) NOT NULL ,TMaxRR varchar(5) NOT NULL ,TotRainFall decimal(6,2) NOT NULL ,AvgTemp decimal(4,2) NOT NULL ,TotWindRun decimal(5,1) NOT NULL,HighAvgWSpeed decimal(3,1),THAvgWSpeed varchar( 5 ), PRIMARY KEY(LogDate) ) COMMENT = \"Dayfile from Cumulus\"";
$WindBearField=2;
$StartOfReplaceSQL="REPLACE INTO " . $table_name . " (LogDate,HighWindGust,HWindGBear,THWindG,MinTemp,TMinTemp,MaxTemp,TMaxTemp,MinPress,TMinPress,MaxPress,TMaxPress,MaxRainRate,TMaxRR,TotRainFall,AvgTemp,TotWindRun,HighAvgWSpeed,THAvgWSpeed)";
$EndFieldCount=18;
}