| <HTML> |
| <HEAD><TITLE>Run SQL</TITLE> |
| <link type="text/css" rel="stylesheet" href="http://www.eclipse.org/org/processes/dashboard/eclipse-dashboard.css"> |
| </HEAD> |
| <BODY> |
| <?php |
| |
| |
| require_once "/home/data/httpd/eclipse-php-classes/system/dbconnection_dashboard_rw.class.php"; |
| |
| require_once "groups.class.php"; |
| require_once "../dashboard/utils.php"; |
| require_once "hostname.php"; |
| require_once "common_queries.php"; |
| require_once "../dashboard/constants.php"; |
| |
| $dbc_cache = new DBConnectionDashboard(); |
| $db_handle = $dbc_cache->connect(); |
| |
| $project = $_GET['project']; |
| |
| |
| $groups = new Groups(); |
| $groups->loadGroups(); // Load groups |
| |
| // Get last date available for $project in DB |
| $mysql_date = get_last_date($db_handle); |
| |
| // Get info for the project |
| |
| |
| |
| ?> |
| |
| <p id="header"><img src="http://www.eclipse.org/images/Idea.jpg" align="right" height="86" hspace="50" width="120"> |
| <br> |
| |
| <span class="indextop">Project Dashboards</span><br> |
| <span class="indexsub">Test Cases </span></p> |
| |
| <h1>Run SQL </h1> |
| <p><br> |
| </p> |
| <form name="form1" method="post" action=""> |
| <p> |
| <textarea name="sql" cols="50" rows="10" id="sql"></textarea> |
| </p> |
| <p> |
| <input type="submit" name="Submit" value="Submit"> |
| </p> |
| </form> |
| <p> |
| <? |
| include("mysql_dialog.php"); |
| $sql="show tables"; // SQL String to send to the Database Server |
| if(isset($_REQUEST['sql']) && strlen($_REQUEST['sql']) > 0) |
| { |
| $sql = $_REQUEST['sql']; |
| } |
| |
| |
| $db=new mysql_dialog("1"); // with "1" possible errors will be printed |
| $db->connecteclipse($db_handle); |
| $db->onscreen($sql); |
| $db->speak($sql); |
| while ($out=$db->listen()){ |
| for ($x=0; $x<$db->fields; $x++){ |
| echo $out[$x]."<br>"; |
| } |
| } |
| echo "Number of rows: ".$db->rows."<br>"; |
| echo "Number of fields: ".$db->fields."<br>"; |
| ?> |
| </p> |
| <p><br> |
| <font color="grey">Last update 15/11/2005 </font> |
| </p> |
| </BODY> |
| </HTML> |