I have this query statement and want to only get records that has a certain column empty (volunteers_2009.venue_id
)
Table is volunteers_2009
, column I am looking to see if it is empty: venue_id
Here is the current query:
SELECT volunteers_2009.id, volunteers_2009.comments,
volunteers_2009.choice1, volunteers_2009.choice2, volunteers_2009.choice3,
volunteers_2009.lname, volunteers_2009.fname, volunteers_2009.venue_id,
venues.venue_name
FROM volunteers_2009 AS volunteers_2009
LEFT OUTER JOIN venues ON (volunteers_2009.venue_id = venues.id)
ORDER by $order $sort
I am trying to do this:
SELECT volunteers_2009.id, volunteers_2009.comments,
volunteers_2009.choice1, volunteers_2009.choice2, volunteers_2009.choice3,
volunteers_2009.lname, volunteers_2009.fname, volunteers_2009.venue_id,
venues.venue_name
FROM volunteers_2009 AS volunteers_2009
LEFT OUTER JOIN venues ON (volunteers_2009.venue_id = venues.id)
ORDER by $order $sort
WHERE volunteers_2009.venue_id == ''
How would I only list records that have an empty column (venue_id
) within the table (volunteers_2009
)?