The Truth
11-16-2009, 12:46 AM
I hope my title isn't too confusing, but here is what I'd like, if possible.
Say I had a table called articles, and from the table articles I wanted to select the latest 20 articles, but also in the query find the total amount of rows in the articles table. Is something like this possible?
So the original query would be:
SELECT * FROM articles ORDER BY article_date DESC LIMIT 20
I'm trying to cut down as many queries as possible, which is why I ask.
Say I had a table called articles, and from the table articles I wanted to select the latest 20 articles, but also in the query find the total amount of rows in the articles table. Is something like this possible?
So the original query would be:
SELECT * FROM articles ORDER BY article_date DESC LIMIT 20
I'm trying to cut down as many queries as possible, which is why I ask.