Yii Framework Forum: Yii2 Displaying relation table data - Yii Framework Forum

Jump to content

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

Yii2 Displaying relation table data

#1 User is offline   Zhen Mubarak 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 24-October 15

Posted 22 September 2017 - 08:00 PM

I have a table with three columns namely "id, category, parent". How do I show data by category name by parent? If in query logic looks like this: select category from table.category where parrent = 01.
How do I display in gridview inside yii2?
0

#2 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,322
  • Joined: 16-February 11
  • Location:Japan

Posted 26 September 2017 - 05:58 AM

Would you please describe more clearly your table schema and the construction of the relevant models with more details? What is the name of the table? What types the columns are? And what foreign key constraints do they have?
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