title: compare varchar with number in sql query
body: <p>table </p>
  
  <pre><code>user(varchar40)      credit(varchar40)
  u1                   400
  u2                   500
  u3                   600
  u4                   650
  </code></pre>
  
  <p>and query</p>
  
  <pre><code>$sql=mysql_query("SELECT `user` FROM `tbl` WHERE `credit` &lt; '8'");
  for($i=0;$i&lt;mysql_num_rows($sql);$i++)
  
  {
  echo mysql_result($sql,$i,0);
  }
  </code></pre>
  
  <p>and result
  u1<br>
  u2<br>
  u3<br>
  u4 </p>
  
  <p>because credit is varchar only first number compare and return all user</p>
  
  <p>how i do correct compare without change table ??? </p>