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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

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.