Yii Framework Forum: Get A Foreign Key Based On Uniq Columns. - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Get A Foreign Key Based On Uniq Columns. Rate Topic: -----

#1 User is offline   DrP 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 18-December 13

Posted 18 December 2013 - 04:36 PM

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!
0

#2 User is offline   Abhishek Shah 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 86
  • Joined: 20-July 12
  • Location:Ahmedabad,India

Posted 23 December 2013 - 05:32 AM

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?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users