title: MySQL using SELECT WHERE Primary Key = XYZ
body: <p>Is it possible to use "Primary Key" instead of a column in a <code>SELECT * WHERE</code> query in MySQL?</p>
  
  <p>Example situation:</p>
  
  <pre><code>table1:
  name (P) | surname
  
  table2:
  page (P) | content
  </code></pre>
  
  <p>I have tried (PHP)</p>
  
  <pre><code>SELECT * FROM $table WHERE PRIMARY=$row
  </code></pre>
  
  <p>and nothing has been returned (despite PHPMyAdmin highlighting it).</p>
  
  <p>I want to do this because I want to make a <code>getDbData</code> function where I only need to specify the table (<code>$table</code>) and the row (<code>$row</code>, row name is primary key's value) for it to return the single row I need.</p>