mymilkexpired
10-22-2003, 09:43 PM
<?PHP
mysql_connect("localhost", "XXXX", "XXXX") or die(mysql_error());
mysql_select_db("XXX") or die(mysql_error());
$query = "SELECT tdate,company,priority,wfmcase,escstatus,description FROM submissions WHERE ostatus ='Open'";
$result = mysql_query($query) or die(mysql_error());
?>
<table width="700" border="1">
<tr>
<td colspan="6">Open Cases</td>
</tr>
<tr>
<td class="table-title">Date</td>
<td class="table-title">Company</td>
<td class="table-title">Priority</td>
<td class="table-title">Status</td>
<td class="table-title">Case</td>
<td class="table-title">Description</td>
</tr>
<?php
while($row = mysql_fetch_array($result)){
echo "<tr><td>" . $row['tdate'] . "</td>
<td>" . $row['company'] . "</td>
<td>" . $row['priority'] . "</td>
<td>" . $row['escstatus'] . "</td>
<td>" . $row['wfmcase'] . "</td>
<td>" . $row['description'] . "</td>
</tr>";
}
?>
<tr>
<td colspan="6">Seperator</td>
</tr>
<tr>
<td colspan="6">Closed Cases</td>
</tr>
<?php
$query2 = "SELECT tdate,company,priority,wfmcase,escstatus,description FROM submissions WHERE ostatus ='Closed'";
$result2 = mysql_query($query2) or die(mysql_error());
while($row2 = mysql_fetch_array($result2)){
echo "<tr><td>" . $row['tdate'] . "</td>
<td>" . $row['company'] . "</td>
<td>" . $row['priority'] . "</td>
<td>" . $row['wfmcase'] . "</td>
<td>" . $row['escstatus'] . "</td>
<td>" . $row['description'] . "</td>
</tr>";
}
?>
<tr>
<td colspan="6">Footer</td>
</tr>
</table>
</body>
</html>
Okay heres the deal, the first query works fine, and returns the results that are "Open" however the 2nd query does not return any results that are closed. There are closed results i have verified them at the mysql console...... why wont they display? what did i do wrong?
mysql_connect("localhost", "XXXX", "XXXX") or die(mysql_error());
mysql_select_db("XXX") or die(mysql_error());
$query = "SELECT tdate,company,priority,wfmcase,escstatus,description FROM submissions WHERE ostatus ='Open'";
$result = mysql_query($query) or die(mysql_error());
?>
<table width="700" border="1">
<tr>
<td colspan="6">Open Cases</td>
</tr>
<tr>
<td class="table-title">Date</td>
<td class="table-title">Company</td>
<td class="table-title">Priority</td>
<td class="table-title">Status</td>
<td class="table-title">Case</td>
<td class="table-title">Description</td>
</tr>
<?php
while($row = mysql_fetch_array($result)){
echo "<tr><td>" . $row['tdate'] . "</td>
<td>" . $row['company'] . "</td>
<td>" . $row['priority'] . "</td>
<td>" . $row['escstatus'] . "</td>
<td>" . $row['wfmcase'] . "</td>
<td>" . $row['description'] . "</td>
</tr>";
}
?>
<tr>
<td colspan="6">Seperator</td>
</tr>
<tr>
<td colspan="6">Closed Cases</td>
</tr>
<?php
$query2 = "SELECT tdate,company,priority,wfmcase,escstatus,description FROM submissions WHERE ostatus ='Closed'";
$result2 = mysql_query($query2) or die(mysql_error());
while($row2 = mysql_fetch_array($result2)){
echo "<tr><td>" . $row['tdate'] . "</td>
<td>" . $row['company'] . "</td>
<td>" . $row['priority'] . "</td>
<td>" . $row['wfmcase'] . "</td>
<td>" . $row['escstatus'] . "</td>
<td>" . $row['description'] . "</td>
</tr>";
}
?>
<tr>
<td colspan="6">Footer</td>
</tr>
</table>
</body>
</html>
Okay heres the deal, the first query works fine, and returns the results that are "Open" however the 2nd query does not return any results that are closed. There are closed results i have verified them at the mysql console...... why wont they display? what did i do wrong?