Get A Foreign Key Based On Uniq Columns.

Hi All,

Had only 2 days to jump on to some framework to finish a surprise project quickly, so picked up "yii" to help me out with foundation.

Now I have good prototype, but am facing a challenge.

I have two tables, tableA and tableB.

   tableA (keyA INT, fieldA1 VARCHAR, fieldA2 VARCHAR, fieldA3 VARCHAR);


   tableB (keyB INT, fk2A INT, fieldB1 VARCHAR);

In the form for tableB

I need to be able to populate fk2A in tableB based on fieldA1, fieldA2, fieldA3.

(1) Present drop down for fieldA1.

(2) Present drop down for fieldA2 for current value of fieldA1.

(3) Present drop down for fieldA3 for current value of fieldA1+fieldA2.

(4) Finally populate fk2A for appropriate value of keyA when user is done with tableB form.

Any help appreciated.

Thanks!

I think you can make dependent dropdowns & make it,you can make a2 dependent of a1,a3 dependent of a1,a2 & so on,

at what point you are stuck up?

I have a similar situation. Any response will be of good help.