Jump to content

[SOLVED] Finding PK field(s) from a MySQL table?


Slagar

Recommended Posts

I was just wondering if there is a simple way to find the Primary Key field(s) of a MySQL table.

 

I've looked it up, and can only seem to find mysql_field_type, which doesn't seem to do what I want, so I thought someone here might know a way :)

If not I'll likely just do a workaround -- have the last three characters of id fields consistently as "_id" in tables with composite keys or something.

 

Cheers  ;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.