sheridan Posted July 4, 2007 Share Posted July 4, 2007 i'm about to try to start on the development of a script that when you type in a textarea at the bottom of a news page, it will post it up on the news site (basically a forum in that aspect) but also i want the news page to show the last 5 posts and then have pages of history after that point. i'm wanting to know the basic concept of doing something like this. i'm probably completely wrong, but i'm thinking querying the database for all entries and using pagination on those queries. but i'm trying to think of how to do that without it being a million different queries? i realize it'll probably use the incrementing ID, then i want to store author, time posted, and message of course, and a title. i know how to set it up database side i believe. just i don't know the best way to pull the information i want without having a lot of overhead or something Quote Link to comment https://forums.phpfreaks.com/topic/58338-solved-php-posting-script/ Share on other sites More sharing options...
teng84 Posted July 4, 2007 Share Posted July 4, 2007 to get the last five mysql_query('SELECT news FROM table name ORDER BY newsid DESC LIMIT 5'); ON PAGING mysql_query('SELECT news FROM table name ORDER BY newsid DESC LIMIT put starting vaue, put ending value'); Quote Link to comment https://forums.phpfreaks.com/topic/58338-solved-php-posting-script/#findComment-289258 Share on other sites More sharing options...
sheridan Posted July 4, 2007 Author Share Posted July 4, 2007 i love you. Quote Link to comment https://forums.phpfreaks.com/topic/58338-solved-php-posting-script/#findComment-289346 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.