title: Should I escape an expected integer value using mysql_real_escape_string or can I just use (int)$expectedinteger
body: <p>is it safe to use cast (int) instead of escaping?</p>
  
  <pre><code>class opinion
  {
     function loadbyopinionid($opinionid){
        $opinionid=(int)$opinionid;
        mysql_query("select * from fe_opinion where opinionid=$opinionid");
        //more code 
     }
  }
  </code></pre>