Hey,
I have a section on my site for news articles. On the home page, it displays the latest article from the database.
The SQL that powers this is simply:
Code:
SELECT * FROM tbl_News ORDER BY nws_Date DESC
The code then just picks the record that the pointer is currently on, and displays it.
What I was wondering, is if there's a way to only select the last entered record in the DB, so that the SQL Statement doesn't return the entire table, which could be a significant performance hit once more than a few news articles have been added?
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE
|