nelsonm - 6:50 am on Sep 16, 2011 (gmt 0)
other than testing a result field value with an if statement, does mysql offer the ability to set a replacement value in a left join when the condition is not met?
LEFT JOIN customer
ON workorder.id = customer.id ELSE USE 'Not Defined'
So the idea is if there's no matching customer.id, assign 'Not Defined' to customer.name instead of executing the following...
$customer = mysql_fetch_array($result,MYSQL_NUM);
if($customer['name'] == '') $customer['name'] = 'Not Assigned';