Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2007
    Location
    Leeds, UK
    Posts
    514
    Thanks
    24
    Thanked 19 Times in 19 Posts

    php SQL next page script

    http://barkstonltd.co.uk/search.php?...3&y=20&page=1&

    That page has a 2 searches on it with limits i have it outputting debug information
    [sql]
    SELECT * FROM `Products` WHERE `name` LIKE '%%' OR `description` LIKE '%%' OR `applications` LIKE '%%' LIMIT 5, 10
    [/sql]

    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
    Last edited by barkermn01; 12-12-2008 at 05:16 PM.
    Working towards a Internet where we don't have website just browser applications Kill the Hyper-link and say hello to 3D Games in the browser :)

  • #2
    Regular Coder lokeshshettyk's Avatar
    Join Date
    Aug 2008
    Location
    On the way to the moon!
    Posts
    157
    Thanks
    5
    Thanked 20 Times in 20 Posts
    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

  • Users who have thanked lokeshshettyk for this post:

    barkermn01 (12-12-2008)

  • #3
    Regular Coder
    Join Date
    Nov 2007
    Location
    Leeds, UK
    Posts
    514
    Thanks
    24
    Thanked 19 Times in 19 Posts
    Quote Originally Posted by lokeshshettyk View Post
    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
    Working towards a Internet where we don't have website just browser applications Kill the Hyper-link and say hello to 3D Games in the browser :)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •