Began to create your first website. But I ran into such a problem: We need to somehow limit the amount of news on one page. News from the database using ORDER BY.

  • 2
    ORDER BY someFieldName LIMIT start, num - Zowie

1 answer 1

Hey. Modify database query by adding LIMIT:

SELECT * FROM `news` ORDER BY `name` LIMIT 0, 10 

LIMIT is called with two parameters - from which record to start, and how much to output. Try this.

  • Thank you brother! - Alexander Zhamoydik
  • Thanks in karma is not plus. ;) - ling