[Firebug-cvs] firebug/web db_create.php,1.6,1.7 table_select.php,1.6,1.7
Brought to you by:
doolin
From: <che...@us...> - 2003-07-10 09:01:12
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1:/tmp/cvs-serv9251 Modified Files: db_create.php table_select.php Log Message: add cnt column to db Index: db_create.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_create.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** db_create.php 22 May 2003 21:48:45 -0000 1.6 --- db_create.php 10 Jul 2003 09:01:09 -0000 1.7 *************** *** 38,45 **** mysql_query($statement) or die("Error: ".mysql_error()." in creating location atable"); ! $statement = "CREATE TABLE current (mote_id INTEGER, time DECIMAL(9,3), temp FLOAT, rel_hum FLOAT, baro_pres FLOAT)"; mysql_query($statement) or die("Error: ".mysql_error()." in creating current atable"); ! $statement = "CREATE TABLE cumulative (mote_id INTEGER, time DECIMAL(9,3), temp FLOAT, rel_hum FLOAT, baro_pres FLOAT)"; mysql_query($statement) or die("Error: ".mysql_error()." in creating cumulative atable"); --- 38,45 ---- mysql_query($statement) or die("Error: ".mysql_error()." in creating location atable"); ! $statement = "CREATE TABLE current (mote_id INTEGER, time DECIMAL(9,3), temp FLOAT, rel_hum FLOAT, baro_pres FLOAT, cnt INTEGER)"; mysql_query($statement) or die("Error: ".mysql_error()." in creating current atable"); ! $statement = "CREATE TABLE cumulative (mote_id INTEGER, time DECIMAL(9,3), temp FLOAT, rel_hum FLOAT, baro_pres FLOAT, cnt INTEGER)"; 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);"; print "<br />"; print $statement; --- 53,57 ---- for ($i = 2; $i <= $nummotes+1; $i++) { ! $statement = "insert into current values ($i,NULL,NULL,NULL,NULL,NULL);"; print "<br />"; print $statement; Index: table_select.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/table_select.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** table_select.php 23 May 2003 00:57:14 -0000 1.6 --- table_select.php 10 Jul 2003 09:01:09 -0000 1.7 *************** *** 28,31 **** --- 28,32 ---- <td>Rel. Hum.</td> <td>Baro. Pres.</td> + <td>cnt </td> </tr> *************** *** 54,57 **** --- 55,62 ---- } + if ($cnt == "") { + $cnt = "%"; + } + if ($temp == "") { $temp = "%"; *************** *** 69,72 **** --- 74,78 ---- where mote_id like '$mote_id%' and time like '$time%' + and cnt like '$cnt%' and temp like '$temp%' and rel_hum like '$rel_hum%' *************** *** 100,103 **** --- 106,113 ---- print ("<td>"); print $row["baro_pres"]; + print ("</td>"); + + print ("<td>"); + print $row["cnt"]; print ("</td>"); |