Jump to content

[SOLVED] Help Retrieving News Entries


hazade

Recommended Posts

I implemented the PHP News (http://newsphp.sourceforge.net/index.php) software into my website and need a little help modifying it. Basically there is a script to pull the latest news entries (amount set by a variable stored in the db; currently set to 4) from a database and display it on your page. What I am trying to do is figure out a way to skip the newest entry and display the next 4 entries. From what I can tell, the code used to pull the news from the database is

 

 $sql = 'SELECT id,posterid,time,subject,titletext FROM ' . $db_prefix . 'news WHERE catid=\'' . $_GET['headcat'] . '\' AND trusted = 1 ORDER BY id DESC LIMIT ' . $Settings['numtoshowfhl'] . '';

 

Basically I guess what I want to do is change the id to subract 1 from the latest entry. Am I on the right track here or do I need to look somewhere else?

Link to comment
https://forums.phpfreaks.com/topic/42011-solved-help-retrieving-news-entries/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.