Actually this is kinda related to MYSQL but I always need it in PHP!
For example I have 3 tables:
– Product (ProductID, name)– Package (PackageID, name)– Price (PriceID, ProductID, PackageID, price)
Now in my layout I want it to show the name of the package, the name of the product and then the price!
What I do and I am sure it is completely incorrect is I have to write 3 queries!
SELECT * FROM PRICE …
then once I get the packageID and the productID
again I write
SELECT * FROM product ..
SELECT
is there anyways to make a view or Stored Procedure that can do all of this in one query?! for example make a view with the following
product name, package name, price and perhaps priceID …
? thanks alot!