heya all, new here - first post
this is a bit of a cross category question, but i think it's most applicable here. I am writing a news script, that pulls news items and comments and so on from a few tables in a mySQL database. My poroblem is I only want it to select the newest 5 entries by default (this number should be easily changable). I can see 2 ways around it - the news tabel has an auto incrementing proimary key, so the highest 5 entries in that should be the newest 5 entries.... but that isn't very neat. The tabel also has a date field and atime field, so a combination of those would also work... problem is i can't think how to implement it. I dont ,mid if it's in the scrip after the MySQL query, or inside the query, but in the query would be more memory effecient i imaging.
Thanks in advance,
Josh