All pastes #730453 Raw Edit

Stuff

public text v1 · immutable
·published 2007-10-09 07:02 UTC
rendered paste body
Hi, the query belows purpose is to return results only if the p.products_image is empty. Whats the best way to do this because the below method does not work. Thanks so much


$query = "SELECT DISTINCT p.*, pd.*
          FROM " . TABLE_PRODUCTS . " p
          LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id
          WHERE p.products_id = pd.products_id 
          AND p.products_image = " . '' . "LIMIT 10";