I am a beginner in SQL. I have created 3 tables in my database : "DOCTORID", "PATIENTS", "VISITS". For simplicity purposes, I have only a one-to-many relationship btw these tables : One doctor has many patients and one patient can have many visits... in my table "VISITS".
How can I have a link to each patient and add or create a new visit? Each visit will have some fields like for example: chief complaint, vital signs. I need my visits to have automatically todays date and hour. I would like to add new visits and verify or read past visits.
The patient id is $id in my 'patients' table.
Thanks