--- Pete <[EMAIL PROTECTED]> wrote:

<-snip->

This is where the third table comes in, with just two
fields, patient,
and drug, to link the tables together.
Patient 20 (John Smith) is on drug 23
Patient 31 (Maria Jones) is on drug 13
Patient 31 is on drug 915
Patient 50 is on drug 23

Patient code and patient name in PATIENTS
Drug code and drug name in DRUGS
Patient code and drug code in LINK

<-snip->

But there is no code, Pete, these values have been
entered manually by secretaries. As I said in the
initial enquiry, there are two sets of data:

The 70 tables (which was obviously the wrong
approach), each 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. 

To be honest, I was hoping to be able somehow to have
a variable, an array stored in one field on the
"patients" table.  That array can somehow reference
the other set of data from the medications table (the
70 rows).  So that when a patients name is selected,
the array variable can be output giving a list of the
mediciactions!.

Can a table column contain a variable?

For example:-

PATIENTS TABLE
id | name | $medications[70] ]
1  | John | some code here to fetch the value of
$medications from the 70 rows?

and so on?
And thank you all.
David


                
___________________________________________________________ 
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