your output result has to be in side the query loop. if outside only one result is done.
<div id="news">
<div class="asnazzy">
<b class="atop"><b class="ab1"></b><b class="ab2 color_c"></b><b class="ab3 color_c"></b><b class="ab4 color_c"></b></b>
<div class="aboxcontent">
<h1 class="color_c">Market News</h1>
<p>
<table cellspacing="0" cellpadding="2" border="0">
<?
$sql = "SELECT * FROM tblnewsdetails order by intnewsID desc limit 1";
$temps = $DB_site->query($sql);
if($row=$DB_site->fetch_array($temps))
{
$tradeaid = $row["intnewsID"];
$accountid = $row["intAccountID"];
$stitle = $row["newsshTit"];
$updated = $row["dtAddedOn"];
echo '<tr><td width="90% align=left">'. $stitle. '</td></tr>';
}
?>
</table>
</p>
</div>
amigura
Junior Poster in Training
72 posts since Jan 2008
Reputation Points: 11
Solved Threads: 7
:D i just noticed the limit 1 in original code. remove this and test original code or try one below.
<div id="news">
<div class="asnazzy">
<b class="atop"><b class="ab1"></b><b class="ab2 color_c"></b><b class="ab3 color_c"></b><b class="ab4 color_c"></b></b>
<div class="aboxcontent">
<h1 class="color_c">Market News</h1>
<p>
<table cellspacing="0" cellpadding="2" border="0">
<?
$sql = "SELECT * FROM tblnewsdetails order by intnewsID desc";
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)) {
$tradeaid = $row["intnewsID"];
$accountid = $row["intAccountID"];
$stitle = $row["newsshTit"];
$updated = $row["dtAddedOn"];
echo '<tr><td width="90% align=left">'. $stitle. '</td></tr>';
}
?>
</table>
</p>
</div>
amigura
Junior Poster in Training
72 posts since Jan 2008
Reputation Points: 11
Solved Threads: 7
amigura
Junior Poster in Training
72 posts since Jan 2008
Reputation Points: 11
Solved Threads: 7
use code TAGS i have tried 100 different ways using [code] tags doesn't work.
Please give me an example.
Or if i couldl get the article just to open in a new window that would be great.
Click on linkHelp with Code Tags in any post with proper use of code tags to see tutorial or follow this link
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902