Results 1 to 6 of 6
-
27th Jun 2010, 05:44 PM #1OPMember
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: 5Please follow signature rules
-
27th Jun 2010, 06:00 PM #2MemberWebsite's:
proxxy.in scnpic.com w7s.orgi 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']);
did you update counters?
-
27th Jun 2010, 06:19 PM #3OPMember
yea I updated the counters with no success.
Please follow signature rules
-
27th Jun 2010, 07:24 PM #4Respected Member
Are you getting any results or an error?
-
27th Jun 2010, 10:50 PM #5OPMember
I get results
PHP Code:New Users Registered Today: 41
New Posts Posted Today: 1
and users registered moves around but the number is offPlease follow signature rules
-
28th Jun 2010, 05:28 AM #6Respected Member
Have you tried using phpmyadmin with the sql and see what results it returns?
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Need Coding
By Sanny in forum Web Development AreaReplies: 4Last Post: 23rd Sep 2012, 03:52 PM -
Zen Coding - Set of plugins for HTML and CSS hi-speed coding
By soft2050 in forum Web Development AreaReplies: 5Last Post: 19th Feb 2012, 09:31 PM -
[Hiring] Coding from PSD to IPB
By Shad0w in forum Completed TransactionsReplies: 0Last Post: 27th Dec 2011, 08:06 PM -
need help with coding
By SᴩiDᴇЯ in forum vBulletinReplies: 0Last Post: 1st Mar 2011, 07:15 AM -
I need help with this coding.
By -Im.z2ight- in forum Webmaster DiscussionReplies: 25Last Post: 1st May 2010, 10:22 PM
themaRegister - register to forums...
Version 3.54 released. Open older version (or...