Yii Framework Forum: Dif. Themes In Selected Id - Yii Framework Forum

Jump to content

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

Dif. Themes In Selected Id dif. themes in selected id Rate Topic: -----

#1 User is offline   roadrunner 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 74
  • Joined: 21-June 12

Posted 14 July 2013 - 06:31 PM

hi i have lets say i have tbl_dept and the dept column was group by. Now the other tbl_theme list all my theme for specific dept.
heres my table
======================================================================
tbl_dept || tbl_theme
======================================================================
id | dept || id | theme_user | theme
----------------------------------------------------------------------
1 deptA 1 deptA themeB
2 deptA 2 deptC themeA
3 deptB 3 deptB themeB
4 deptC 4 deptD themeC
5 deptA 5 mytheme theme_mytheme
6 deptB 6
...

if you gruop the dept is should be
1-deptA
3-deptB
4-deptC
now if i view the the id of 2 in tbl_dept the theme should be theme_mytheme
and if i view the id in 1 the theme should be themeB, in id 3 theme should be themeB
0

#2 User is offline   codesutra 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 596
  • Joined: 15-March 11
  • Location:India

Posted 14 July 2013 - 11:21 PM

View Postroadrunner, on 14 July 2013 - 06:31 PM, said:

hi i have lets say i have tbl_dept and the dept column was group by. Now the other tbl_theme list all my theme for specific dept.
heres my table
======================================================================
tbl_dept || tbl_theme
======================================================================
id | dept || id | theme_user | theme
----------------------------------------------------------------------
1 deptA 1 deptA themeB
2 deptA 2 deptC themeA
3 deptB 3 deptB themeB
4 deptC 4 deptD themeC
5 deptA 5 mytheme theme_mytheme
6 deptB 6
...

if you gruop the dept is should be
1-deptA
3-deptB
4-deptC
now if i view the the id of 2 in tbl_dept the theme should be theme_mytheme
and if i view the id in 1 the theme should be themeB, in id 3 theme should be themeB


Didn't understand this.Could you please explain a bit more clearly.What you are doing now and what you want to achieve?
now if i view the the id of 2 in tbl_dept the theme should be theme_mytheme
and if i view the id in 1 the theme should be themeB, in id 3 theme should be themeB

CodeSutra
0

#3 User is offline   roadrunner 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 74
  • Joined: 21-June 12

Posted 15 July 2013 - 12:30 AM

simple just add specific theme in the tbl_dept that group by.
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