Hi all,
I am building an internal site which manages our computers/users and what software is currently installed on each system.
My query is that I want to show all the copies of one particular piece of software, and whether they are installed on a computer (and which computer!).
So I have the basic 'product', 'product_line' tables and then an 'installation' table which holds the 'Product_Line_ID' and also the 'Computer_ID' from the 'computer' table.
I think I have to use a left outer join because I want to show all the product_line items of a particular product, and if they are installed, I want to show which computer they are on.
Here is the query that isn't working, but it should give you the general gist of what I am aiming towards.
SELECT *
FROM product, product_line, category, installation
WHERE product.Product_ID = product_line.Product_ID AND product.Product_ID = '$HTTP_GET_VARS[Product_ID]' AND product.Category_ID = category.Category_ID AND installation.Product_Line_ID = product_line.Product_Line_ID LEFT OUTER JOIN computer ON installation.Computer_ID = computer.Computer_ID
Please can someone help with this query as it's bugging me greatly!
Thanks
sipps
I am building an internal site which manages our computers/users and what software is currently installed on each system.
My query is that I want to show all the copies of one particular piece of software, and whether they are installed on a computer (and which computer!).
So I have the basic 'product', 'product_line' tables and then an 'installation' table which holds the 'Product_Line_ID' and also the 'Computer_ID' from the 'computer' table.
I think I have to use a left outer join because I want to show all the product_line items of a particular product, and if they are installed, I want to show which computer they are on.
Here is the query that isn't working, but it should give you the general gist of what I am aiming towards.
SELECT *
FROM product, product_line, category, installation
WHERE product.Product_ID = product_line.Product_ID AND product.Product_ID = '$HTTP_GET_VARS[Product_ID]' AND product.Category_ID = category.Category_ID AND installation.Product_Line_ID = product_line.Product_Line_ID LEFT OUTER JOIN computer ON installation.Computer_ID = computer.Computer_ID
Please can someone help with this query as it's bugging me greatly!
Thanks
sipps