...

View Full Version : Resolved php SQL next page script



barkermn01
12-12-2008, 11:33 AM
http://barkstonltd.co.uk/search.php?q=&x=23&y=20&page=1&

That page has a 2 searches on it with limits i have it outputting debug information

SELECT * FROM `Products` WHERE `name` LIKE '%%' OR `description` LIKE '%%' OR `applications` LIKE '%%' LIMIT 5, 10


This is the SQL query running for the output but for some reason it is not returning the correct ammount of results it retuning 10 not the 5, 10 Limit

lokeshshettyk
12-12-2008, 02:13 PM
What do you mean by "returning 10, not the 5, 10" - pretty confusing statement :)

What was expected of your SQL statement? 5 rows or 10?

- by specifying "limit 5, 10" means return 10 rows from the 5th row on the table.
- limit x, y means fetch 'y' number records starting from row number 'x'

Cheers :)

barkermn01
12-12-2008, 04:01 PM
What do you mean by "returning 10, not the 5, 10" - pretty confusing statement :)

What was expected of your SQL statement? 5 rows or 10?

- by specifying "limit 5, 10" means return 10 rows from the 5th row on the table.
- limit x, y means fetch 'y' number records starting from row number 'x'

Cheers :)

Thanks i allways thought it was limit 5, 10 meent row 5 to row 10 thanks so much



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum