RE: [PHP] Strange query

From: Date: Thu, 04 Nov 2004 19:58:40 +0000
Subject: RE: [PHP] Strange query
Groups: php.general 
Request: Send a blank email to php-general+get-201214@lists.php.net to get a copy of this message
[snip] $query = "select gallery_url,description from members limit ".$limit[0].",".$limit[1]; the first time: limit 0,15 and the second time: limit 16,30 [/snip] from http://www.mysql.com/select "The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must be integer constants. With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1): " My guess is that you have 32 rows in the table, you started at 16 and asked for 30 records. You got back 17, which is all that was left

« previous php.general (#201214) next »