Skip to content

Instantly share code, notes, and snippets.

@atayahmet
Last active July 29, 2016 17:06
Show Gist options
  • Save atayahmet/14cff5766d4194bc9a090dfdeeb26f5d to your computer and use it in GitHub Desktop.
Save atayahmet/14cff5766d4194bc9a090dfdeeb26f5d to your computer and use it in GitHub Desktop.

Product To Product Relations

Products table:

id name
1 Kırmızı Etek
2 Mavi Etek
3 Siyah Gömlek
4 Yeşil Pantolon
5 Siyah Kemer
6 Metal Kemer
7 Siyah El Çantası
8 Yeşil Gömlek

Product relation table:

id product_id relation_id
1 1 (Kırmızı Etek) 5 (Siyah Kemer)
2 1 (Kırmızı Etek) 7 (Siyah El Çantası)
3 1 (Kırmızı Etek) 8 (Yeşil Gömlek)

Kıyafet tamamlama listesi:

id name
5 Siyah Kemer
7 Siyah El Çantası
8 Yeşil Gömlek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment