Hello, I apologize if this is a very simple question but I have spent the last half hour searching for an answer to it and have thus far been unable to find one. I am pretty new to mysql so please be easy on me if this is painfully obvious :)
I am trying to determine the primary field in a table through a query from php to my database. I have several tables that could be potentially queried by a particular function in my web site, but the primary field used to identify the ID for different item types are all named specifically to match the table and item type that it is stored in it. My solution to this was to use the primary key in each table as the identifying factor to compare the item ID with the correct field data. I have not been able to find any information on how to obtain the primary field so as to compare its value for each row to the item ID that I want to match. Thank you in advance for any assistance or direction that you could point me in.