HOw data can recognize which file data should be in
My program is about getting data from database and write it to a text file with different file name.
I have config file use to initialize setting.
In my config file i have student description value
student description value use to set which student description i want to retrieved from database
say i want to retrieved
ASIAN and NORTHPOLE
in my config file i have
studentDescription1 = ASIAN
studentDescription2 = NORTHPOLE
and i my database i have
with studentID i can get the data from other table in the database using join as in example
$result = select c.course,c.age,c.address from COURSE c JOIN SCHOOL s ON c.courseid = s.courseid
where studentID = $studenid;
After i get the value of $result , i want to insert $result into the text file.
i also had named my text file name in my config file as below
$filename1 = "ASIAN.txt";
$filename2 = "EROPEAN.txt";
THE PROBLEM I FACE IS THAT HOW CAN I IDENITIFY THAT WHICH $result DATA ARE GOING TO WHICH FILE
how can i make studentid 1345687,1345692 ASIAN go to ASIAN.txt
how can i make studentid 1345678 go to EROPEAN.txt