Activity Stream
48,167 MEMBERS
6699 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member

    Default VB Coding Help

    Well I created this code rather fast. I just can't seem to make it get the correct number results. I know I am over looking something small.

    PHP Code: 

    $newusers 
    $db->query_first('
    SELECT COUNT(*) AS count 
        FROM ' 
    TABLE_PREFIX 'user
        WHERE joindate >= "' 
    strtotime("-1day") . '"
    '
    );
    $newmembers number_format($newusers['count']);



    $newposts $db->query_first('
    SELECT COUNT(*) AS count 
        FROM ' 
    TABLE_PREFIX 'post
        WHERE dateline >= "' 
    strtotime("-1day") . '"
    '
    );
    $newposts number_format($newposts['count']); 
    DeLeTeD Reviewed by DeLeTeD on . VB Coding Help Well I created this code rather fast. I just can't seem to make it get the correct number results. I know I am over looking something small. $newusers = $db->query_first(' SELECT COUNT(*) AS count FROM ' . TABLE_PREFIX . 'user WHERE joindate >= "' . strtotime("-1day") . '" '); $newmembers = number_format($newusers); Rating: 5
    Please follow signature rules

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    proxxy.in scnpic.com w7s.org
    i had same code saved somewhere

    PHP Code: 
    $newusers $db->query_first('
    SELECT COUNT(*) AS count
        FROM ' 
    TABLE_PREFIX 'user
        WHERE joindate >= "' 
    strtotime("-1day") . '"
    '
    );
    $newmembers number_format($newusers['count']);
     
     
     
    $newposts $db->query_first('
    SELECT COUNT(*) AS count
        FROM ' 
    TABLE_PREFIX 'post
        WHERE dateline >= "' 
    strtotime("-1day") . '"
    '
    );
    $newposts number_format($newposts['count']); 
    cant see why it wouldnt work

    did you update counters?

  4.     
    #3
    Member
    yea I updated the counters with no success.
    Please follow signature rules

  5.     
    #4
    Respected Member
    Are you getting any results or an error?

  6.     
    #5
    Member
    I get results

    PHP Code: 
    New Users Registered Today41 
    New Posts Posted Today:  
    New posts always stays at 1-3
    and users registered moves around but the number is off
    Please follow signature rules

  7.     
    #6
    Respected Member
    Have you tried using phpmyadmin with the sql and see what results it returns?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need Coding
    By Sanny in forum Web Development Area
    Replies: 4
    Last Post: 23rd Sep 2012, 03:52 PM
  2. Zen Coding - Set of plugins for HTML and CSS hi-speed coding
    By soft2050 in forum Web Development Area
    Replies: 5
    Last Post: 19th Feb 2012, 09:31 PM
  3. [Hiring] Coding from PSD to IPB
    By Shad0w in forum Completed Transactions
    Replies: 0
    Last Post: 27th Dec 2011, 08:06 PM
  4. need help with coding
    By SᴩiDᴇЯ in forum vBulletin
    Replies: 0
    Last Post: 1st Mar 2011, 07:15 AM
  5. I need help with this coding.
    By -Im.z2ight- in forum Webmaster Discussion
    Replies: 25
    Last Post: 1st May 2010, 10:22 PM

Tags for this Thread

BE SOCIAL