I am trying to set-up a news page on my site which
a) only lists the 10 most recent entries
b) writes the first sentance/100 characters of each story with a "more" button to expand the story.
I have the news articles in a db with auto_increment id numbers, which is then sorted in descending order to give the most recent story first. However,
Code: Select all
SELECT TOP 10 story FROM newsI wanted MySQL to limit the size of the story, because if a user then reads the article, the whole lot would need to be parsed twice and I guess in PHP this is not efficient.
If any one can help with either of these problems I would be greatful.