This topic is locked
[SOLVED]

 Help with some code

10/20/2011 3:35:41 PM
PHPRunner General questions
N
notuo author

Hi.
I have this problem I am clueless how to solve it.
This is a 2 step process, the first one is OK but the second is the one I need help.
I have a table with several items: TC(idx, name)
and I have the main table: PERSON(id, tests, ...)

tests (varchar) is a one to many relationship to TC. ie each PERSON can have many TC to choose from)
This part is fine I can display the whole TC table and choose from there and save the information in the PERSON table. One clerk do this process and releases to another fill the second form later.
The second part is my problem. I need to process the TC for a PERSON and gave them a value (radio button for each of the TC already assigned).
TC:

1, name1

2, name2

3, name3

...

n, namen
PERSON:

1, "1,3,8"

2, "2,5"
I think I need another table to use: CC(personid, tcid, value)
The final result I guess will be something like:
1,1,value

1,3,value

1,8,value

2,2,value

2,5,value
I don't know how to:

  1. Setup the Query relating all the tables
  2. Present the second process in another form as:
    Person 1
    name1 ( ) value ( ) value ( ) value ( ) value ( ) value

    name3 ( ) value ( ) value ( ) value ( ) value ( ) value

    name8 ( ) value ( ) value ( ) value ( ) value ( ) value
    Notice: Only the already elements chosen are displayed to get the values.
    I was looking to the events but I don't know where nor ow to code this.
    Any help is appreciated.