Hey.. the idea of the code is to pull up the various prices of an item from a separate table..
$i=0;
while($i < $num)
{
echo '<td width="125">';
$id=mysql_result($result,$i,"id"); echo $id;
include("dbinfo.inc.php");
@mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM prize WHERE p_id=$id";
$result=mysql_query($query);
$num=mysql_num_rows($result);
mysql_close();
echo '<table width="100%" bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="5" align="left">';
while ( $row = mysql_fetch_array($result) )
{
echo '<tr>';
echo '<td bgcolor="#FFFFFF" width="30%" align="default" class="body2">Php ' .$row['priceprize']. '</td>';
echo '<td bgcolor="#FFFFFF" width="70%" align="left" class="body2"> >> ' .$row['pricedealr']. '</td>';
echo '</tr>';
}
echo '</table>';
echo '</font></td>';
$i++;
}
but waht happens is that only the prices of the first column (the first "$i") are displayed.. the following columns contain errors.. it seems that in the following columns $id cant be read by the query.. thanks in advance..
Vince