title: Fetch only one row in PHP/MySQL
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2973202/mysql-fetch-array-expects-parameter-1-to-be-resource-boolean-given-in-select">mysql_fetch_array() expects parameter 1 to be resource, boolean given in select</a>  </p>
  </blockquote>
  
  
  
  <p>simple question here.</p>
  
  <p>I have a SELECT query</p>
  
  <pre><code>SELECT FROM friendzone WHERE ID = '$editID'"
  </code></pre>
  
  <p>I am sure this is going to give me only one row as result, cause ID's can't be duplicate in my DB.</p>
  
  <p>How can I access the column values?</p>
  
  <pre><code>$row = mysql_fetch_array($query);
  </code></pre>
  
  <p>I think this is useless since I don't have to make any array.. I have only one row!</p>
  
  <p>If I don't put it into a While cicle, and try to do e.g.</p>
  
  <pre><code>.$row['ID'].
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>mysql_fetch_array() expects parameter 1 to be resource, boolean given
  </code></pre>
  
  <p>Thanks in advance everyone.</p>