title: Selecting two field in MySQL with PHP
body: <p>i'm relatively new to php and mysql and would like to know how to select two value in mysql with php.</p>
  
  <p>What i have is</p>
  
  <pre><code>$query = sprintf("SELECT COUNT(id) FROM table WHERE UPPER(username) = UPPER('%s') AND password='%s'"...
  </code></pre>
  
  <p>in this case, i'm only selecting and count if the id exist and i use</p>
  
  <pre><code>list($count) = mysql_fetch_row($result);
          if($count == 1)
  </code></pre>
  
  <p>and by using cookies, i would like to retrieve two value from the database, namely user (the user's name) and power (which has value of 1,2 or 3, indicating the menu they would be able to see) basically it is to differentiate if you're admin or normal user, but i wonder if i could do </p>
  
  <pre><code>SELECT COUNT(id) AND power FROM table WHERE ...
  </code></pre>
  
  <p>is this possible? or is there any other way? </p>
  
  <p>Please guide me, thanks.</p>