Jump to content
Sign in to follow this  
stuart73

php help

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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.

  • Great Answer 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.