1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Database query only returns max 30 results

Discussion in 'General Programming Chat' started by pxoxrxn, May 15, 2013.

  1. pxoxrxn

    pxoxrxn Supreme Member

    Joined:
    Dec 21, 2011
    Messages:
    1,397
    Likes Received:
    2,066
    Hey, I just wrote a simple query for my MySQL DB to try extract all verified email addresses. The query looked like this:

    SELECT *
    FROM user
    WHERE verified >0;

    For some reason it only returns a handful of results and then adds a line to the bottom saying MAX 0,30. I changed it to 2000 and it does the same. I am expecting it to return 1500+ results.
     
  2. Joppe

    Joppe Registered Member

    Joined:
    Feb 28, 2009
    Messages:
    83
    Likes Received:
    16
    SELECT * FROM user WHERE verified > 0 LIMIT 2000;

    This should work.
     
  3. innozemec

    innozemec Jr. VIP Jr. VIP

    Joined:
    Aug 19, 2011
    Messages:
    5,290
    Likes Received:
    1,799
    Location:
    www.Indexification.com
    Home Page:
    you are using phpmyadmin probably considering the fact the limit 0,30 is auto added, right?

    Simply use what Joppe said when using phpmyadmin, that should work.. if not using phpmyadmin your original query will be fine as well
     
  4. innosoft

    innosoft Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 25, 2008
    Messages:
    1,633
    Likes Received:
    639
    Occupation:
    Software Developer, SEO
    Location:
    Office
    Home Page:
    it will show only 30.. u need to navigate to next page. or click on show all at bottom.
     
  5. moijeishaianu

    moijeishaianu Newbie

    Joined:
    Jun 28, 2013
    Messages:
    15
    Likes Received:
    0
    yeah use some desktop client for sql queries, there will no be limit like that