How do I get my mysql database to return 0 if the neighborhood in the WHERE clause doesn't exist? So in the example below, Old Town is not in the database. I'd like the database to return 0 incidents instead of an empty result.
SELECT incidents,
neighborhoods
FROM `myTable`
WHERE neighborhoods ='Old Town'
I also tried
SELECT IFNULL(incidents,0),
IFNULL(neighborhoods,0)
FROM `myTable`
WHERE neighborhoods ='Old Town'
Any suggestions would be really appreciated.