Commit 3d23a097 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Dump out the reserved nodes for an experiment using a fancy join

operation I figure out all on my own.
parent 3f3c7f40
......@@ -118,6 +118,43 @@ echo "<tr>
# Suck out the node information.
$reserved_result = mysql_db_query($TBDBNAME,
"SELECT * FROM reserved WHERE ".
"eid=\"$exp_eid\" and pid=\"$exp_pid\"");
if (mysql_num_rows($reserved_result)) {
echo "<h3>Reserved Nodes</h3>
<table align=center border=1>
<td>Node ID</td>
<td>Node Type</td>
# I'm so proud!
$query_result = mysql_db_query($TBDBNAME,
"SELECT nodes.node_id, nodes.type FROM nodes LEFT JOIN reserved ".
"ON nodes.node_id=reserved.node_id ".
"WHERE reserved.eid=\"$exp_eid\" and\"$exp_pid\"");
while ($row = mysql_fetch_array($query_result)) {
$node_id = $row[node_id];
$type = $row[type];
echo "<tr>
echo "</table>\n";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment