title: Select in IF statement, MySQL
body: <p>I'm trying to do something like this in My MySQL stored proc:</p>
  
  <pre><code>if val &gt; SELECT numericalValue FROM table where userId=theUserId then ..
  </code></pre>
  
  <p>Is it ok to do that, or do I have to store <code>numericalValue</code> in a temporary?</p>