![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 27 Pomógł: 0 Dołączył: 7.06.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam!
Mam 3 tabele w bazie danych: Products: id name Colors: id name Products_has_colors product_id color_id Każdy produkt może być opisany jednocześnie przez kilka kolorów (relacja n-m) W modelu mam: product.php: protected $belongs_to_many = array('Product_has_colors'); colors.php: protected $belongs_to_many = array('Product_has_colors'); product_has_colors.php: protected $has_and_belongs_to_many = array('products, colors'); Nie mogę odczytać wyników tego zapytania w kontrolerze products.php Czy coś źle zapisuję? |
|
|
![]() ![]() |
![]() |
Aktualny czas: 21.08.2025 - 05:24 |