I have a simple query as follows:
SELECT sum( people) as total
FROM event
WHERE event.id = 4;
The event id 4 is not in the table (intentionally) so the query returns NULL. How would I modify the query to deal with NULL values?
I am trying to use this with a php script so if the id is non existent the php script should fail.