Most Recent Record

I have this table with these columns:

table.sections
id
item
created
modified

I want to select the top 10 most recent items,

SELECT * 
FROM sections 
ORDER BY created, modified DESC 
LIMIT 10

Will that grab the most top 10 most recent out of created and modified?

no :slight_smile:

all the sections are first sorted in ascending sequence by created, and then if any two or more sections share the same identical created value, then those are sorted by the most recent modified first

what you want is

… ORDER BY GREATEST(created,modified) DESC LIMIT 10

Is the output what you want when you run that query?

Ya that is what I was trying to say, I thought it was doing something like that, TY

… LOL if i went on to do this the way I was thinking before I asked this, it would have been a big shame…