Can anyone tell me why this isn't working? All that's displayed is a blank screen, but the queries aren't dying, and they are returning valid results.
<?php
$dbcx = mysql_connect($dbhost,$dbuser,$dbpass) or die ("Could not connect to the database server.");
mysql_select_db($dbase) or die ("Could not select database.");
$sql = "SELECT DISTINCT pickno FROM picked";
$result = mysql_query($sql) or die ("Could not execute the query.");
if(mysql_num_rows($result) == 0)
{
echo "Sorry, you have no picklist's created.";
exit;
}
?>
<font color="red"><b>Shipping Screen</b></font>
<br>
<br>
<?php
while($row = mysql_fetch_array($result))
{
?>
<table width="600" border="1" bordercolor="black" cellpadding="5" cellspacing="0">
<tr>
<td colspan="5" align="middle">
Items for picklist # <?=$row['pickno']?>
<br>
</td>
</tr>
<tr>
<td>
</td>
<td>
Description
</td>
<td>
Quik-run #
</td>
<td>
Customer Product #
</td>
<td>
Quantity
</td>
</tr>
<?php
$sql2 = "SELECT * FROM picked WHERE pickno = '".$row['pickno']."'";
$result1 = mysql_query($sql2) or die ("Could not execute query.");
while($row1 = mysql_fetch_array($result1))
{
?>
<tr><td><a href="?page=editpick&id=<?=$row1['id']?>">Adjust Picklist</a></td><td><?=$row1['desc']?><td><?=$row1['quikrunno']?></td><td><?=$row1['productno']?></td><td><?=$row1['quantity']</td></tr>
<?php
}
?>
</table>
<?php
}
?>
The reason I need to split it up into two queries is because there could be X number of records with the same invoice number, so I want to simply display the invoice number at the top, and then list the items below it.
Any help is appreciated.