Goody another easy to answer one :) no harm intended.. it's a perfectly good question

Okay first is it sorted how you want?

if so you can use the LIMIT start,len feature of mysql..

for example:

select * from table_name order by col_name limit 5,10

will select records 5 to 15 (5+10) if of course there are 10 more to collect otherwise 
it will just return whatever it finds from the select that is ordered by col_name..

quite simple..

:  Julien Bonastre [ CEO]
:  A.K.A. The_RadiX
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
  ----- Original Message ----- 
  Sent: Sunday, May 19, 2002 12:01 AM
  Subject: [PHP] Complex(ish) Question for Newbie

  How can I return the last five lines of a mySQL database table?

  JJ Harrison


  PHP General Mailing List (
  To unsubscribe, visit:

Reply via email to