title: select substring of column returns null and empty
body: <p>I'm having trouble using mysql's <code>substr</code> function. </p>
  
  <p>my query is:</p>
  
  <p><code>SELECT distinct(substr(col1,0,10)) from table;</code></p>
  
  <p>The results returned are <code>NULL</code> and an empty row.</p>
  
  <p>Am I using <code>substr</code> incorrectly, or can I not use <code>distinct</code> or a column name?</p>
  
  <p>thanks</p>