How to identify composite primary key in any Mysql Database table?
or
EDIT 2
what sql query should be used to
display the indees of any table who
contains the composite primary keys?
I have many tables in mysql database which are having composite keys of 2 or 3 primary keys, I am using phpmyadmin, and I have to code a php script to identify which table has the composite keys, right now i can identify the primary key of the tables by using a query
SHOW INDEXES FROM `".$row3['TABLE_NAME']."` WHERE Key_name = 'PRIMARY'
which is giving me what i want, but now how can i find out the indexes where i have composite keys?
EDIT 1
In the context of Daniel Image comment
for look of composite primary keys in
phpmyadmin

UPDATE:
Further to the updated question, you may want to use the following in your PHP script:
This query will return
num_keys> 1 if tabletbhas a composite primary key.I’m not sure if I understood what you are trying to achieve, but you may want to consider using
SHOW INDEXas follows:If it were not a composite key, you would only get one row in the
SHOW INDEXquery: