At 12:56 PM -0500 11/26/02, Mike At Spy wrote:
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

As computers are wont to do, it's sending back what you asked for ;)

The first LIMIT parameter is the starting row (starting at 0), the second is the number of records to return. So it's returning the 31st through 90th records.

CHeck about 1/2 thee way down

http://www.mysql.com/doc/en/SELECT.html

for more info.


-steve
--
+------------------------------------------------------------------------+
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis (530)754-9127 |
| Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ |
+------------------------------------------------------------------------+
| SETI@Home: 1001 Work units on 23 oct 2002 |
| 3.152 years CPU time, 3.142 years SETI user... and STILL no aliens... |
+------------------------------------------------------------------------+

---------------------------------------------------------------------
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