title: Return a default value if single row is not found
body: <p>I have the following select statement to grab the next scheduled item for a stream. If there is no matching row, I want it to return a default value.
  Here's the SQL that I'm using:</p>
  <pre><code>SELECT `file`
  FROM `show`, `schedule` 
  WHERE `channel` = 1
    AND `start_time` &lt;= UNIX_TIMESTAMP() 
    AND `start_time` &gt; UNIX_TIMESTAMP()-1800
    AND `show`.`id` = `schedule`.`file` 
  ORDER BY `start_time`
  DESC LIMIT 1
  </code></pre>
  <p>That should grab the most recently scheduled item, but not if it's older than 30 minutes before the query.</p>
  <p>However, if the user doesn't schedule anything, I want a default value, so that something actually plays on the stream. I've tried the following:</p>
  <pre><code>SELECT COALESCE(`file`, 'default.webm')
  FROM `show`, `schedule`...
  </code></pre>
  <p>And</p>
  <pre><code>SELECT IFNULL(`file`, 'default.webm')
  FROM `show`, `schedule`
  </code></pre>
  <p>However, it always returns an empty result if no rows are found. How can I return a default value instead?</p>