SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast webmasts's Avatar
    Join Date
    Apr 2003
    Location
    usa
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem with members joined today

    Hi, what i'm trying to do is show how many people joined TODAY. When I use the CURDATE() to find out if anyone joined today, it shows the total members? How can I do that with mysql and php?

    Here's what I did:

    $sql = @mysql_query("SELECT signupdate FROM members WHERE signupdate='CURDATE()'");

    $count = @mysql_num_rows($sql);

    echo $count;

  2. #2
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    remove the single quotes from CURDATE(), as that makes it a string.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  3. #3
    SitePoint Enthusiast webmasts's Avatar
    Join Date
    Apr 2003
    Location
    usa
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried that and it still isn't showing the correct numbers. Should I use the mysql_result() function instead of mysql_num_rows()?


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
  •