yoshida Posted July 4, 2006 Share Posted July 4, 2006 EDIT: FIXED!$query="SELECT * FROM news ORDER BY date DESC LIMIT 1";How do I query a database to only echo the latest entry from a certain table? I know how to display data and order it by a certain field, but I only want to display the latest adition (the one with the newest date).Date is formatted as yyyymmdd so that's what it's sorted by.Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now