title: Login validation algorithms
body: <p>I know of one -   </p>
  
  <pre><code>SELECT * FROM log_records WHERE 'username'=uname AND 'password'=pass;
  if(row_count==1)
      return true;
  return false;  
  </code></pre>
  
  <p>The questions are:</p>
  
  <ul>
  <li>Is the above algorithm a 'best practice'?</li>
  <li>Are there any alternatives to the above algorithm?</li>
  </ul>
  
  <p>Thanks!</p>