Hi Weng,

Thank you for responding.It is slightly unclear to me.
In the first table "patients", do you not fill in any
medications details? then there would be a need to
insert 70 columns with names like MedID1, MedID2,
MedID3 to MedID70. and/or add details of patients to
the second table "medication".  (unless I missed the
point altogether!). Regards, David


---------------------------------
Hi David,

Off the top of my head, you could do 3 tables:
1. patients (PatID, Name, other details)
2. medication (MedID, Medicine, dosage, etc) you could
have 2 aspirins with
diff. dosages
3. patient_med (PMID, PatID, MedID)

To get medicines for a patient:
Select MedID, Medicine, ... from patients a,medication
b,patient_med c where
a.PatID = c.PatID and b. MedID = c.MedID and
a.QueryField = FilterValue

To get all patients on a medicine:
Select PatID, Name, ... from patients a,medication
b,patient_med c where
a.PatID = c.PatID and b. MedID = c.MedID and
b.QueryField = FilterValue

I think this accomodates a lot of variables already.
The other more senior
members can help scrutinize my idea.

Hope this helps.
-Weng
 
________________________________
From: David Halliday

I wonder if you could advise on this point.

There are already 70 tables, (one for each medicine).
Each table has a
column listing all the patients on that medicine. For
example:

      ASPIRIN   lists 1989 patients's names (in one
column)
      VALIUM    lists   734 patients' names
      so on

There is also one table called PATIENTS. It lists all
the 2000 individuals'
names. Perhaps there is a faster and more efficient
way!  




The php_mysql group is dedicated to learn more about
the PHP/MySQL web database possibilities through group
learning. 

  
    
---------------------------------
  YAHOO! GROUPS LINKS

  
    Visit your group "php_mysql" on the web.
   
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
   
    Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.

  
---------------------------------





                
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/CefplB/TM
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to