SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Limit 0,10

  1. #1
    SitePoint Guru defiance's Avatar
    Join Date
    Oct 2004
    Location
    United states
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Limit 0,10

    hi.

    i ve got a quick question here.

    what is the meaning of the sql query


    select* from table where name='me' limit 0,10


    ----------------------------------------------------

    would it mean that the 0,10 would select from row 0 to 10

    or

    select the result of the name is me from result row 0 until 10?

    i am doing a paging stuff here.

    any respone would be greatly appreciated.


    thanks alot.

  2. #2
    SitePoint Zealot tcwatts's Avatar
    Join Date
    Jan 2003
    Location
    .my
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the 2nd option is correct.

  3. #3
    SitePoint Guru defiance's Avatar
    Join Date
    Oct 2004
    Location
    United states
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what if let say i have a query


    select * from table where (subject =%ha% or content = %ha%)

    and say the result returns 23 row


    and

    select * from table where (subject =%ha% or content = %ha%) limit 0,10

    so it would display from row 0 to row 10 FROM the 23 returned row?

  4. #4
    Free Geek computerages's Avatar
    Join Date
    Oct 2004
    Location
    /dev/null
    Posts
    1,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by defiance
    what if let say i have a query


    select * from table where (subject =%ha% or content = %ha%)

    and say the result returns 23 row


    and

    select * from table where (subject =%ha% or content = %ha%) limit 0,10

    so it would display from row 0 to row 10 FROM the 23 returned row?
    Yup. You're answering to your question yourself. lol


Bookmarks

Posting Permissions

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