IFNULL

[email protected] ("Ron Piggott")
Newsgroups php.db
Message-ID <60979.173.206.66.142.1266134502.squirrel@www.theverseoftheday.info>
How do I add " IFNULL " to the LEFT JOIN query?  I either want the result
from the database or a 0 instead of the word NULL

Ron

SELECT `store_product_profile`.`reference` , inventory.inventory, 
sold_1.quantity, sold_2.quantity, sold_3.quantity
FROM `store_product_profile`

LEFT JOIN (

SELECT `store_product_inventory_control`.`store_product_profile_reference`
, SUM( `store_product_inventory_control`.`quantity` ) AS inventory
FROM `store_product_inventory_control`
GROUP BY `store_product_inventory_control`.`store_product_profile_reference`
) AS inventory ON `store_product_profile`.`reference` =
`inventory`.`store_product_profile_reference`
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.