[llvm-commits] CVS: nightlytest-serverside/EmailReport.php

Jim Laskey jlaskey at apple.com
Thu Sep 14 08:33:32 PDT 2006



Changes in directory nightlytest-serverside:

EmailReport.php updated: 1.9 -> 1.10
---
Log message:

Set up query test

---
Diffs of the changes:  (+10 -44)

 EmailReport.php |   54 ++++++++++--------------------------------------------
 1 files changed, 10 insertions(+), 44 deletions(-)


Index: nightlytest-serverside/EmailReport.php
diff -u nightlytest-serverside/EmailReport.php:1.9 nightlytest-serverside/EmailReport.php:1.10
--- nightlytest-serverside/EmailReport.php:1.9	Thu Sep 14 10:25:16 2006
+++ nightlytest-serverside/EmailReport.php	Thu Sep 14 10:33:18 2006
@@ -2,57 +2,23 @@
 <body>
 <?php
 
-/*
-if(!isset($HTTP_GET_VARS['machine']) || !is_numeric($HTTP_GET_VARS['machine'])){
-        print "Error: Incorrect URL!\n";
-        die();
-}
-$machine_id = $HTTP_GET_VARS['machine'];
-
-if(!isset($HTTP_GET_VARS['night']) || !is_numeric($HTTP_GET_VARS['night'])){
-        print "Error: Incorrect URL!\n";
-        die();
-}
-$night_id = $HTTP_GET_VARS['night'];
-
-if(!(include "NightlyTester.php")) {
-  print "Error: could not load necessary files!\n";
-  die();
-}
-
-if(!(include"ProgramResults.php")) {
-  print "Error: could not load necessary files!\n";
-  die();
-}
-
-$mysql_link=mysql_connect("127.0.0.1","llvm","ll2002vm") or die("Error: could not connect to database!\n");
+$mysql_link = mysql_connect("127.0.0.1","llvm","ll2002vm") or die("Error: could not connect to database!\n");
 mysql_select_db("nightlytestresults");
 
-$query = "DELETE FROM night WHERE machine = \"56\"";
-$night_query = mysql_query($query) or die (mysql_error());
-/*
-if ($row = mysql_fetch_array($night_query) or die (mysql_error())) {
-  while ($value = current($row)) {
-    $key_name = key($row);
-    print "$key_name = $value<br>\n";
-    next($row);
+$query = $_POST["Query"];
+$query = preg_replace("/\n/", " ", $query);
+$my_query = mysql_query($query) or die (mysql_error());
+
+while ($row = mysql_fetch_array($my_query)) {
+  foreach ($row as $key => $value) {
+    print "$key => $value, ";
   }
+  print "<br>\n";
 }
 
-mysql_free_result($night_query);
-
-$query = "DELETE FROM night WHERE machine = \"56\"";
-$night_query = mysql_query($query) or die (mysql_error());
-mysql_free_result($night_query);
-
-
+mysql_free_result($my_query);
 
 mysql_close($mysql_link);
-*/
-
-$Query = $_POST["Query"];
-
-print "$Query\n";
 
 ?>
 </body>






More information about the llvm-commits mailing list