Re: [PHP-DB] IFNULL

2010-02-14 Thread Chris
Ron Piggott wrote: 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`

RE: [PHP-DB] IFNULL used in a UPDATE

2002-03-13 Thread Gurhan Ozen
Hi Jane, No questions are lame. The statement you wrote down wouldn't work as IFNULL() function doesn't work the way you intended. See http://www.mysql.com/doc/C/o/Control_flow_functions.html for this.. I would accomplish it in two statements. Here it is: SELECT (@a:=(CASE box1 WHEN '' THEN NOW