Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Display Relational Data...

$
0
0
Sry for being so straight but i've search some of the topic but i just don't understand..
Let's say i have 2 tables..

First is Brand with brand_id and brand_name as variable
table brand
brand_id (int)
brand_name (varchar)

the next table is product
table product
product_id (int)
product_brand (id), references to table brand (brand_id)
product_name (varchar)

but in the view.php when showing the product.. instead of showing the product_brand (id), i want to show the product name

example
product_id: 114326
product_brand: Samsung (instead of the id, show the name)
product_name: Galaxy Note 10.1

how to do that?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>