Update of /cvsroot/firebug/firebug/web
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30120
Modified Files:
db_create.php
Log Message:
Fixed database creation script to reflect changes in data structures (messages).
Index: db_create.php
===================================================================
RCS file: /cvsroot/firebug/firebug/web/db_create.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** db_create.php 19 Dec 2003 01:06:02 -0000 1.11
--- db_create.php 18 Feb 2004 15:32:15 -0000 1.12
***************
*** 35,45 ****
/* 3 create table statements for firebug sensors. */
! $statement = "CREATE TABLE location (mote_id INTEGER, longitude FLOAT, latitude FLOAT)";
mysql_query($statement) or die("Error: ".mysql_error()." in creating location atable");
! $statement = "CREATE TABLE current (mote_id INTEGER, time TIMESTAMP, temp FLOAT, cnt INTEGER, hours INTEGER, minutes INTEGER, dec_sec INTEGER, Lat_deg INTEGER, Lat_dec_min INTEGER, Long_deg INTEGER, Long_dec_min INTEGER, NSEWind INTEGER)";
mysql_query($statement) or die("Error: ".mysql_error()." in creating current atable");
! $statement = "CREATE TABLE cumulative (mote_id INTEGER, time TIMESTAMP, temp FLOAT, cnt INTEGER, hours INTEGER, minutes INTEGER, dec_sec INTEGER, Lat_deg INTEGER, Lat_dec_min INTEGER, Long_deg INTEGER, Long_dec_min INTEGER, NSEWind INTEGER)";
mysql_query($statement) or die("Error: ".mysql_error()." in creating cumulative atable");
--- 35,78 ----
/* 3 create table statements for firebug sensors. */
!
!
!
! /*
! typedef struct GGAMsg {
!
! uint16_t mote_id
! uint8_t hours;
! uint8_t minutes;
! float dec_sec;
! uint8_t Lat_deg;
! float Lat_dec_min;
! uint8_t Long_deg;
! float Long_dec_min;
! uint8_t NSEWind;
! uint8_t num_sats;
! } GGAMsg;
! */
!
! $statement = "CREATE TABLE location (mote_id SMALLINT, time TIMESTAMP, gps_hours SMALLINT, gps_minutes SMALLINT, gps_seconds FLOAT, lat_deg SMALLINT,";
! $statement .= "lat_dec_min FLOAT, long_deg SMALLINT, long_dec_min FLOAT, nsew SMALLINT, numsats SMALLINT)";
!
mysql_query($statement) or die("Error: ".mysql_error()." in creating location atable");
! /*
! typedef struct Firedata_msg {
! uint16_t mote_id;
! uint16_t cnt;
! float temp;
! float rel_hum;
! float baro_pres;
! float lux;
! } Firedata_msg;
! */
!
! $statement = "CREATE TABLE current (mote_id SMALLINT, time TIMESTAMP, cnt SMALLINT, temp FLOAT, rel_hum FLOAT, baro_pres FLOAT, lux FLOAT)";
mysql_query($statement) or die("Error: ".mysql_error()." in creating current atable");
!
! $statement = "CREATE TABLE cumulative (mote_id SMALLINT, time TIMESTAMP, cnt SMALLINT, temp FLOAT, rel_hum FLOAT, baro_pres FLOAT, lux FLOAT)";
mysql_query($statement) or die("Error: ".mysql_error()." in creating cumulative atable");
***************
*** 53,57 ****
for ($i = 2; $i <= $nummotes+1; $i++) {
! $statement = "insert into current values ($i,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);";
print "<br />";
print $statement;
--- 86,90 ----
for ($i = 2; $i <= $nummotes+1; $i++) {
! $statement = "insert into current values ($i,NULL,NULL,NULL,NULL,NULL,NULL);";
print "<br />";
print $statement;
|