I have this code working 100%, but it doesn't show the latest details required from the MySQL database.
$SQL = "SELECT * FROM wdclients ORDER BY 'id' DESC LIMIT 6";
$result = mysql_query($SQL);
while ($db_field = mysql_fetch_assoc($result)) {
echo $latest1;
print $db_field['clientid'];
echo $latest2;
print $db_field['cname'];
echo $latest3;
print $db_field['cname'];
echo $latest4;
}
The problem now is that I require the code to show only the 6 latest entries in the database. I have over 500 clients in the database but it only shows the first 6 and never update.
The "ID" field in database has set the auto-increment value.