[PHP] trying to get a certain num of rows in mysql
When doing a select query, is there any way to specify which rows you want selected, as in rows 1 through 40, and then 40 - 80 on the next query. I've been searching through the manual but can't find anything. Should this be done through a php script instead, or is there a native (mysql) command/clause for this?
Re: [PHP] trying to get a certain num of rows in mysql
Look for LIMIT in the manual Pablo Oliva wrote: When doing a select query, is there any way to specify which rows you want selected, as in rows 1 through 40, and then 40 - 80 on the next query. I've been searching through the manual but can't find anything. Should this be done through a php script instead, or is there a native (mysql) command/clause for this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] trying to get a certain num of rows in mysql
Look at limit... eg Select * from xyz limit 1,5 Timothy Hitchens (HITCHO) [EMAIL PROTECTED] HITCHO has Spoken! -Original Message- From: Pablo Oliva [mailto:[EMAIL PROTECTED]] Sent: Sunday, 13 October 2002 8:44 AM To: [EMAIL PROTECTED] Subject: [PHP] trying to get a certain num of rows in mysql When doing a select query, is there any way to specify which rows you want selected, as in rows 1 through 40, and then 40 - 80 on the next query. I've been searching through the manual but can't find anything. Should this be done through a php script instead, or is there a native (mysql) command/clause for this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php