Read the documentation.
http://www.mysql.com/doc/en/SELECT.html

The link has been sent out on this list about 6 times this morning, all in
posts regarding the limit clause.

The LIMIT clause can be used to constrain the number of rows returned by the
SELECT statement. LIMIT takes one or two numeric arguments. The arguments
must be integer constants. If two arguments are given, the first specifies
the offset of the first row to return, the second specifies the maximum
number of rows to return. The offset of the initial row is 0 (not 1):

-----Original Message-----
From: Mike At Spy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 9:56 AM
To: [EMAIL PROTECTED]
Subject: LIMIT in MySQL



I must not be awake yet.  Why is this query sending me back 60 records?
Shouldn't it only send back records 30 through 60 (i.e. 30 records)?

SELECT * FROM table ORDER BY somefield LIMIT 30,60

Thanks,

-Mike



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to