jaymc Posted January 9, 2007 Share Posted January 9, 2007 I'm in the processing of setting up a login recorded for my website where as it logs what days members logged into the siteCurrently I have a table created each month automatically and have it logged in thereIve attatched a screenshot of the structure to give you a better idea of how its setupAs you can see from the screenshot a row is created with the users member name then 1-31 fields. If a member logs in on say the 21st then a 1 will be put in the field. If not then it remains a zeroIt all works but Im just wondering is there a better way to do this rather than have a table per month[attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
btherl Posted January 10, 2007 Share Posted January 10, 2007 How about a table which stores a non-unique date for each username? Then, you create a row whenever a user logs in on that day. If no row exists for a given day, then the user did not login on that day. Quote Link to comment Share on other sites More sharing options...
fenway Posted January 10, 2007 Share Posted January 10, 2007 No kidding... one record per user, per login. Quote Link to comment Share on other sites More sharing options...
jaymc Posted January 11, 2007 Author Share Posted January 11, 2007 [quote author=fenway link=topic=121660.msg501666#msg501666 date=1168465222]No kidding... one record per user, per login.[/quote]I average around 50,000 unique logins a month...So after 6 months their could be 300,000 in that tableCaios? Quote Link to comment Share on other sites More sharing options...
fenway Posted January 11, 2007 Share Posted January 11, 2007 Well, if you need to store every login, then yes, you'll need 300K rows. It should still be a tiny table. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.