Jump to content

display most recent mysql entry


eerikk2

Recommended Posts

use this SQL statement:

 

$query = "SELECT * FROM table_name LIMIT 10 ORDER BY id DESC"

 

if your id field is set to "Auto Increment" then you should get the most recent 10 records.

 

I haven't tried it that way but give it a try and tell me what happens.

 

good luck.

True, that was stupid mistake I did, but not on purpose lol.

 

I am sorry, I just have not written an SQL statement in ages since I no longer write raw php, I was just trying to help :)

 

I will alter my post for others who have the same question.

 

good luck.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.