Hi, I am wondering if anyone could help me hereI have trying to sort this 1 out for a while now
Here I have the php code which gets data from mysql, and echo’s it on the browser, problem is it echo’s all the fields of data, and I just like it to echo the first fields only.
so, it echo’s the newest field record only first by title, or id, then date, then listing just once.
<?php
// query db
$sql = mysql_query ("SELECT listingid, Title, Date, Listing, DATE_FORMAT(Date, '%d-%m-%Y') as Date FROM `track-listing` ORDER BY Date DESC");
// echo result from db
while ($row = mysql_fetch_assoc($sql)){
echo "{$row['listingid']}" .
($row['Title']) . "<font size=1 color=#878787>" . "* :: *" . ($row['Date']) . ($row['Listing']) . "</font>" . "<br>";
}
?>
Any help and suggestion is greatly appreciated



I have trying to sort this 1 out for a while now
Reply With Quote

Bookmarks