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 [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::::::::::::::::::::::::::::::::::::::::::
  ----- Original Message ----- 
  From: [EMAIL PROTECTED] 
  To: [EMAIL PROTECTED] 
  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
  [EMAIL PROTECTED]
  www.tececo.com


------------------------------------------------------------------------------


  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to