drayarms Posted May 22, 2011 Share Posted May 22, 2011 Here is one of those purely conceptual questions, which involves no code. I'm trying to create a select query which among other things, allows a user of a website to search other members who fall within a particular age range. I have a column in the table where the members' information are stored which records their ages. Which brings us to the problem. On any given day, a member's age may increase by one year compared to what it was the previous day, hence the need to update this column periodically. I can't think of any way to automatically update this column on a daily basis. So my solution is to run an initial update query every time a member tries to search other members based on age, which updates the age column for all other members, before running the select query which eventually retrieves the desired age range. This leads to the second problem. Imagine there are thousands of users using the website. At any given instance, there could be hundreds of members, trying to search others based on age. This means hundreds of users will be updating a single column (the age column) in one table at the same time. Is this feasible? Can it cause the server to crash? Or is there really a more reasonable way to do all of this? Thank you all for taking your time to read this. Appreciate any responses. Quote Link to comment https://forums.phpfreaks.com/topic/237146-can-multiple-entries-in-a-mysql-table-column-cause-server-to-crash/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 22, 2011 Share Posted May 22, 2011 You would never store a person's age. You would store their date of birth and calculate their age when needed - http://dev.mysql.com/doc/refman/5.0/en/date-calculations.html Quote Link to comment https://forums.phpfreaks.com/topic/237146-can-multiple-entries-in-a-mysql-table-column-cause-server-to-crash/#findComment-1218836 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.