Jump to content

PHP/MySQL question


mrjonnytou

Recommended Posts

Here's the thing:

 

I have a page with names and job titles. When a name is clicked, an edit form opens, populated with the persons details (first_name, last_name, job_role). All fields can be edited. I would like a hidden field to appear when the user changes the job_role field asking the user when "Joe Bloggs" finished/started their new role and give them a field to enter this date into. On saving, I would like the this date to be stored in two places in the same table. Basically, I'd like to build up a table with persons job history.

 

The tables I'm working with include: person, person_history and position

 

person table includes: person_id(key), first_name, last_name

 

person_history table includes: person_id, position_id, date_from, date_to, id(key)

 

position table includes: position_id(key), position

 

How can I save the date entered to the 'date_to' field in the person_history table AND also as a new entry in the 'date_from' field?  ??? ??? ???

 

Any help is appreciated,

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/112041-phpmysql-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.