I have 3 MySQL tables:
and 2 pages:
laptop.php (which will have a list of brands of laptops)
I tried to make a query which displays names and prices from produs which:
Example: (it doesn't work and I don't know why):
SELECT t1.*,t2.*,t3.* FROM produs as t1 join spec_laptop as t2 join spec_telefon as t3 WHERE(t1.id=t3.id_produs OR t1.id=t2.id_produs) AND t2.brand='Acer'
You joined them the wrong way, try this one :
SELECT * FROM produs as t1
inner join spec_laptop as t2 ON t2.id_produs = t1.id
inner join spec_telefon as t3 ON t3.id_produs = t1.id
WHERE t2.brand='Acer'