stuart73 Posted April 13, 2019 Share Posted April 13, 2019 im really new to php and need some help with coding. I have a mysql database with a table 'users' that contains 4 fields. 'room', 'first name', 'last name', 'weight' is there a way i can create a new record for each person everytime they are weighed? and be recalled by date at a later time? any help greatfully received! Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted April 13, 2019 Share Posted April 13, 2019 the users table should only hold unique/one-time user information - first name, last name. this would produce a user_id (auto-increment integer column.) you would store any repetitive user information, such as the weight/date data in a second table, related back to the user through the user_id value. once you have properly stored the data, you can write sql queries to get any user(s) information for any date or date range. 1 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.