title: How to get primary key of table?
body: <p>Is there a way to get the name of primary key field from mysql-database? For example:</p>
  
  <p>I have a table like this:</p>
  
  <pre><code>+----+------+
  | id | name |
  +----+------+
  | 1  | Foo1 |
  | 2  | Foo2 |
  | 3  | Foo3 |
  +----+------+
  </code></pre>
  
  <p>Where the field id is primary key (it has auto increment but I can't use that). How can I retrieve fields name "id" in php?</p>