We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Query of registered users by date.

Development and Programming

DigitalDesigns's avatar
DigitalDesigns
94 posts
14 years ago
DigitalDesigns's avatar DigitalDesigns

I would like to create a query that will list the number of users within a specific membergroup, and display the count of users that registered on each day. (And the list grows with each new day)

For instance:

25July2011 - 138 26July2011 - 41 28July2011 - 35

What I have so far is this (it shows the dates (not grouping yet, and shows every date) :

{exp:query sql="SELECT join_date FROM exp_members WHERE group_id = '5'"}{join_date format="%d %M %Y"} {/exp:query}

Thanks!

       
DigitalDesigns's avatar
DigitalDesigns
94 posts
14 years ago
DigitalDesigns's avatar DigitalDesigns

Bumping this request…anyone???

       
Dave @ Exp:resso's avatar
Dave @ Exp:resso
465 posts
14 years ago
Dave @ Exp:resso's avatar Dave @ Exp:resso

Sorry about the delay in response, this should help:

{exp:query sql="SELECT join_date, COUNT(*) as signup_count FROM exp_members GROUP BY FROM_UNIXTIME(join_date,'%d%m%y') ORDER BY join_date"}
{join_date format="%d %F %Y"} - {signup_count}

{/exp:query}

Let me know how it goes!

       
DigitalDesigns's avatar
DigitalDesigns
94 posts
14 years ago
DigitalDesigns's avatar DigitalDesigns

PERFECT!

Any idea how to show a specific range with this (excluding the registrations of administrators for instance which happened long before site launch)

       
Dave @ Exp:resso's avatar
Dave @ Exp:resso
465 posts
14 years ago
Dave @ Exp:resso's avatar Dave @ Exp:resso

Yep you’d just add a WHERE clause to only pull a certain member group, and only join_dates between a certain range, just search for ‘mysql between’ - you’ll learn faster if you read up on it yourself 😉

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.