I have 3 tables --- Product (prodId, Name) Country (countryId, Name) ProductValue (prodId, countryId, value)
I wish to query ProductValue.value according to prodId for every countries.
SQL Query -> "SELECT * , ( SELECT value FROM Productvalue pv WHERE pv.prodId = p.prodId AND countryId = c.countrycode ) AS value FROM Product p JOIN Countries c WHERE p.prodId =1"
How can I query in phalcon controller using execute()? Please help me that. Thanks