Guest elthomo Posted March 7, 2008 Share Posted March 7, 2008 In my MYSQL database I have a number of records for each user with different timestamps. But all the information on a user is not in every record. So an older record for a user may contain a value in field called date of birth for example. But a later record for the same user will not. What I want to do is pull the the record and have all the newest information available. It possible to have an a PHP/MYSQL query that will do that or would a better way be to, find a way be to when a user submits new data to take all the data from his previous record and add that to the new record. My site isn't live so I can change things around a bit to get something that works. I hope you guys can understand what I mean. All info and code gratefully received :-) Quote Link to comment Share on other sites More sharing options...
beebum Posted March 7, 2008 Share Posted March 7, 2008 Data that is static, like birth date, should be in a separate table. There is no need to duplicate it in multiple rows. Then you use a join to display the static data with the dynamic data. Quote Link to comment Share on other sites More sharing options...
Guest elthomo Posted March 7, 2008 Share Posted March 7, 2008 Thank you I will investigate 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.