Question: 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.

Answer: 
as @BN said, remove quote around `id`. Make your query like this:

```
SELECT * FROM wdclients ORDER BY id DESC LIMIT 0,6

```

or, if you insist, change it into something like this:

```
SELECT * FROM wdclients ORDER BY `id` DESC LIMIT 0,6

```

notice the difference between ( **'** ) and ( **`** )
It's because you have put id in regular single quotes. You have to use backquotes in order for MySQL to parse it into a value:

```
$SQL = "SELECT * FROM wdclients ORDER BY `id` DESC LIMIT 6";

```