title: Get the Next Element of the Next Column of Same Row in PDO/MySQL?
body: <p>Suppose I have a database table consisting of three columns - Userid, Username &amp; Password. And let's assume I am building a Log-in Form and the password is stored in encrypted form. So, before it can be compared with the original password, it needs to be processed a little.</p>
  
  <p>So, I let the user enter the username and password in the form.</p>
  
  <pre><code>include('db.php');      
  $getuid = $connection-&gt;prepare('SELECT FROM users WHERE username = :u');
  $getuid-&gt;execute(array("u" =&gt; $_REQUEST['username']));
  </code></pre>
  
  <p>Now, I have executed the statement, and the row with the Entered Username is selected.</p>
  
  <p><strong>What I Want to Do ?</strong></p>
  
  <p>After Selecting the Row, I want the corresponding Password(which is in encrypted form) and Userid to be stored in <code>$pass</code>, <code>$userid</code> variables.  How can I do that?</p>