Yii Framework Forum: 2 Tables Relation - Yii Framework Forum

Jump to content

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

2 Tables Relation Rate Topic: -----

#1 User is offline   raiethan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 94
  • Joined: 10-February 12

Posted 24 July 2012 - 06:14 PM

Good day to all masters, im new to yii and i have a project in school about my database with 2 tables, named studentP and studentS.
studentP have a row called studentNumber,Fname,Lname,Middle and StudentS have a row callde studentNumber,Scholl,Year,Section
i create A CRUD for that 2 tables,
and i want to show the information of all the students from both the tables on one page or enter data once for one student from one interface? like this:

studentNumber
Fname
Lname
School
Year
Section.
0

#2 User is offline   Wenceslaus D'silva 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 01-November 10
  • Location:Mumbai, India

Posted 24 July 2012 - 07:34 PM

View Postdhenet5254, on 24 July 2012 - 06:14 PM, said:

Good day to all masters, im new to yii and i have a project in school about my database with 2 tables, named studentP and studentS.
studentP have a row called studentNumber,Fname,Lname,Middle and StudentS have a row callde studentNumber,Scholl,Year,Section
i create A CRUD for that 2 tables, when i got to mysite/index.php/StudentP and click one of the list only StudentP i view. my teacer
want that when i click one of the list in StudentP the StudentS lost also will show like:
studentNumber
Fname
Lname
School
Year
Section.


Can you please give us more information or correct me if i am wrong.

Do you mean that you want to show the information of all the students from both the tables on one page or enter data once for one student from one interface?

If yes, then you can use relation and there are few tricks to combine the CRUD

If you provide us with more information we can help you, its not very clear from what you have mentioned.

Cheers
0

#3 User is offline   raiethan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 94
  • Joined: 10-February 12

Posted 24 July 2012 - 08:58 PM

View PostWenceslaus D, on 24 July 2012 - 07:34 PM, said:

Can you please give us more information or correct me if i am wrong.

Do you mean that you want to show the information of all the students from both the tables on one page or enter data once for one student from one interface?

If yes, then you can use relation and there are few tricks to combine the CRUD

If you provide us with more information we can help you, its not very clear from what you have mentioned.

Cheers


yes sir i want to show the information of all the students from both the tables on one page or enter data once for one student from one interface.. can u give me a trick?
0

#4 User is offline   alirz23 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 968
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 10 August 2012 - 04:06 AM

please do take look at the relational active record

http://www.yiiframew...en/database.arr
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