Jump to content

[SOLVED] php news section


wrathican

Recommended Posts

hey guys i want a news section on my website but i only want it to show the latest two entries.

ive got my code sorted to go into the DB get the news items and display them, but i dont know how to cut it down to just the LATEST TWO entries. does it have anything to do with mysql order? any tips you could give me?

Link to comment
https://forums.phpfreaks.com/topic/57629-solved-php-news-section/
Share on other sites

so i would set the limit with mysql?

i was thinking of using a counter but i guess that would slow the website down once there are many entries in the news table.

so all i do is just order it and limit the number of entries it takes. sorted. Thanks!

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.