SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Total Records Keep Varying

    I have database I'm trying to extract my contacts from, which contains somewhere between 33,000 to 39,000 contacts. The reason I don't know the exact number is because everytime I refresh the query MySQL keeps giving me a varying total count.

    Are total results provided by MySQL only estimations that are prone to fluctuate?

  2. #2
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    4,903
    Mentioned
    93 Post(s)
    Tagged
    0 Thread(s)
    Are you using a count query to count them or just a normal select and using something like mysqli_num_rows() (which is a PHP function to get the number of rows in a result set - asp and .net probably have equivalent functions)?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm getting the results straight from PHPMyAdmin, using just a simple SELECT statement. I guess this is a PHPMyAdmin issue rather than a MySQL issue. I hadn't thought to run a COUNT() query until reading your reply. This does bring back consistent results.

    I guess it is PHPMyAdmin that draws the wildly varying estimates.

  4. #4
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    4,903
    Mentioned
    93 Post(s)
    Tagged
    0 Thread(s)
    When you run the simple SELECT statment against the database direct through php and not via phpmyadmin, do you get consistant results?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator


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
  •