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] Link to comment https://forums.phpfreaks.com/topic/33479-login-recorder/ 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. Link to comment https://forums.phpfreaks.com/topic/33479-login-recorder/#findComment-157011 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. Link to comment https://forums.phpfreaks.com/topic/33479-login-recorder/#findComment-157685 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? Link to comment https://forums.phpfreaks.com/topic/33479-login-recorder/#findComment-158393 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. Link to comment https://forums.phpfreaks.com/topic/33479-login-recorder/#findComment-158613 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.