[Firebug-cvs] firebug/web db_create.php,1.9,1.10 db_table_select.php,1.1,1.2
Brought to you by:
doolin
From: <che...@us...> - 2003-11-30 00:22:02
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1:/tmp/cvs-serv565 Modified Files: db_create.php db_table_select.php Log Message: schema changed Index: db_create.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_create.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** db_create.php 30 Jul 2003 22:16:10 -0000 1.9 --- db_create.php 30 Nov 2003 00:21:59 -0000 1.10 *************** *** 38,45 **** mysql_query($statement) or die("Error: ".mysql_error()." in creating location atable"); ! $statement = "CREATE TABLE current (mote_id INTEGER, time TIMESTAMP, temp FLOAT, rel_hum FLOAT, baro_pres FLOAT, cnt INTEGER, rss INTEGER)"; mysql_query($statement) or die("Error: ".mysql_error()." in creating current atable"); ! $statement = "CREATE TABLE cumulative (mote_id INTEGER, time TIMESTAMP, temp FLOAT, rel_hum FLOAT, baro_pres FLOAT, cnt INTEGER, rss INTEGER)"; 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 TIMESTAMP, hours INTEGER, minutes INTEGER, dec_sec INTEGER, Lat_deg INTEGER, Lat_dec_min INTEGER, Long_deg INTEGER, Long_dec_min INTEGER, NSEWind INTEGER, temp FLOAT, cnt INTEGER)"; mysql_query($statement) or die("Error: ".mysql_error()." in creating current atable"); ! $statement = "CREATE TABLE cumulative (mote_id INTEGER, time TIMESTAMP, hours INTEGER, minutes INTEGER, dec_sec INTEGER, Lat_deg INTEGER, Lat_dec_min INTEGER, Long_deg INTEGER, Long_dec_min INTEGER, NSEWind INTEGER, temp 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,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,NULL,NULL,NULL,NULL,NULL,NULL);"; print "<br />"; print $statement; Index: db_table_select.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_table_select.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_table_select.php 4 Aug 2003 16:17:29 -0000 1.1 --- db_table_select.php 30 Nov 2003 00:22:00 -0000 1.2 *************** *** 51,59 **** <td>Mote ID</td> <td>Time</td> <td>Temp</td> <td>Rel. Hum.</td> <td>Baro. Pres.</td> <td>Cnt </td> - <td>Rss </td> </tr> --- 51,66 ---- <td>Mote ID</td> <td>Time</td> + <td>Hours</td> + <td>Minutes</td> + <td>Dec_sec</td> + <td>Lat_deg</td> + <td>Lat_dec_min</td> + <td>Long_deg</td> + <td>Long_dec_min</td> + <td>NSEWind</td> <td>Temp</td> <td>Rel. Hum.</td> <td>Baro. Pres.</td> <td>Cnt </td> </tr> *************** *** 75,78 **** --- 82,118 ---- } + if ($hours == "") { + $hours = "%"; + } + + if ($minutes == "") { + $minutes = "%"; + } + + if ($dec_sec == "") { + $dec_sec = "%"; + } + + if ($Lat_deg == "") { + $Lat_deg = "%"; + } + + + if ($Lat_dec_min == "") { + $Lat_dec_min = "%"; + } + + if ($Long_deg == "") { + $Long_deg = "%"; + } + + if ($Long_dec_min == "") { + $Long_dec_min = "%"; + } + + if ($NSEWind == "") { + $NSEWind = "%"; + } + if ($temp == "") { $temp = "%"; *************** *** 87,94 **** } - if ($rss == "") { - $rss = "%"; - } - $result = mysql_query("select * from $tblname --- 127,130 ---- *************** *** 96,103 **** and time like '$time%' and cnt like '$cnt%' ! and rss like '$rss%' ! and temp like '$temp%' ! and rel_hum like '$rel_hum%' ! and baro_pres like '$baro_pres%'") or die("Error: ".mysql_error()." in query."); --- 132,146 ---- and time like '$time%' and cnt like '$cnt%' ! and hours like '$hours%' ! and minutes like '$minutes%' ! and dec_sec like '$dec_sec%' ! and Lat_deg like '$Lat_deg%' ! and Lat_dec_min like '$Lat_dec_min%' ! and Long_deg like '$Long_deg%' ! and Long_dec_min like '$Long_dec_min%' ! and NSEWind like '$NSEWind%' ! and temp like '$temp%'") ! //and rel_hum like '$rel_hum%' ! //and baro_pres like '$baro_pres%'" or die("Error: ".mysql_error()." in query."); *************** *** 119,140 **** print ("<td>"); ! print $row["temp"]; print ("</td>"); print ("<td>"); ! print $row["rel_hum"]; print ("</td>"); print ("<td>"); ! print $row["baro_pres"]; print ("</td>"); print ("<td>"); ! print $row["cnt"]; print ("</td>"); print ("<td>"); ! print $row["rss"]; print ("</td>"); print ("</tr>"); --- 162,205 ---- print ("<td>"); ! print $row["hours"]; print ("</td>"); print ("<td>"); ! print $row["minutes"]; print ("</td>"); print ("<td>"); ! print $row["dec_sec"]; print ("</td>"); print ("<td>"); ! print $row["Lat_deg"]; print ("</td>"); print ("<td>"); ! print $row["Lat_dec_min"]; ! print ("</td>"); ! ! print ("<td>"); ! print $row["Long_deg"]; ! print ("</td>"); ! ! print ("<td>"); ! print $row["Long_dec_min"]; print ("</td>"); + + print ("<td>"); + print $row["NSEWind"]; + print ("</td>"); + + print ("<td>"); + print $row["temp"]; + print ("</td>"); + + print ("<td>"); + print $row["cnt"]; + print ("</td>"); + + print ("</tr>"); |