Jump to content

[SOLVED] Displaying posts ignoring the latest


starkplastic

Recommended Posts

Hi,

I'm trying to figure out how to logically display the latest posts except for the latest post. I.e. displaying the top five posts excluding the latest one. Can anybody help me with this code or do you have a better solution?

 

$query = "SELECT id, date, title, post FROM news_posts WHERE ID!=$topid ORDER by date DESC limit 5";

$topid = mysql_query("SELECT id FROM news_posts ORDER by date DESC 1");

 

cheers

 

 

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.