I am trying to loop 5 unique rows into 5 table rows built in HTML.
Can this be done? I have tried everything given too me in my reference books, but nothing has yet to cover this topic. I can get it to loop one row five times, but not 5 rows once.
Here is the code:
{
if($tsx OR $tsx2 OR $tsx3 OR $tsx4 OR $tsx5)
mysql_select_db('johnt_core');
$queries = "SELECT date,url,title FROM news WHERE symbol='$tsx' OR symbol='$tsx2' OR symbol='$tsx3' OR symbol='$tsx4' OR symbol='$tsx5' ORDER BY date LIMIT 0,1";
$desult = mysql_query($queries)
or die ("Could not execute query");
while ($now = mysql_fetch_array($desult));
extract($now)
}
?>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" width="800" colspan="12"></td>
</tr>
<tr>
<td width="49" height="122" rowspan="8"></td>
<td height="1" width="402" colspan="4" bgcolor="CCCCCC"></td>
<td width="46" height="122" rowspan="8"></td>
<td colspan="5" width="254" bgcolor="CCCCCC"></td>
<td width="49" height="122" rowspan="8"></td>
</tr>
<tr>
<td width="1" height="120" rowspan="6" bgcolor="CCCCCC"></td>
<td height="20" colspan="2" bgcolor="006699" align="left"><font face="arial" size="1" color="#FFFFFF"> Related Articles:</font></td>
<td width="1" height="120" rowspan="6" bgcolor="CCCCCC"></td>
<td width="1" height="120" rowspan="6" bgcolor="CCCCCC"></td>
<td height="20" colspan="3" bgcolor="006699" align="left"><font face="arial" size="1" color="#FFFFFF"> Our Transactions:</font></td>
<td width="1" height="120" rowspan="6" bgcolor="CCCCCC"></td>
</tr>
<tr>
<td width="100" height="20" bgcolor="F7F7F7" align="center"><font face="arial" size="1"><?php echo $now['$date'] ?></td></font>
<td width="300" height="20" bgcolor="F7F7F7" align="center"><font face="arial" size="1"><a href="<?php echo $now['$url'] ?>" target="blank"><?php echo $now['$title'] ?></a></font></td>
<td width="84" height="20" bgcolor="F7F7F7" align="center"><font face="arial" size="1"></font></td>
<td width="84" height="20" bgcolor="F7F7F7" align="center"><font face="arial" size="1"></font></td>
<td width="84" height="20" bgcolor="F7F7F7" align="center"><font face="arial" size="1"></font></td>
</tr>
<tr>
<td width="100" height="20" align="center"><font face="arial" size="1"><?php echo $date ?></font></td>
<td width="300" height="20" align="center"><font face="arial" size="1"><a href="<?php echo $url ?>" target="blank"><?php echo $title ?></a></font></td>
<td width="84" height="20" align="center"><font face="arial" size="1"></font></td>
<td width="84" height="20" align="center"><font face="arial" size="1"></font></td>
<td width="84" height="20" align="center"><font face="arial" size="1"></font></td>
</tr>
<tr>
<td width="100" height="20" bgcolor="F7F7F7" align="center"><font face="arial" size="1"><?php echo $date ?></font></td>
<td width="300" height="20" bgcolor="F7F7F7" align="center"><font face="arial" size="1"><a href="<?php echo $url ?>" target="_blank"><?php echo $title ?></a></font></td>
<td width="84" height="20" bgcolor="F7F7F7" align="center"><font face="arial" size="1"></font></td>
<td width="84" height="20" bgcolor="F7F7F7" align="center"><font face="arial" size="1"></font></td>
<td width="84" height="20" bgcolor="F7F7F7" align="center"><font face="arial" size="1"></font></td>
</tr>