mixed metaPrimaryKeys(
string $tableName,
optional string $owner=false,
)
The function metaPrimaryKeys() returns the column names in the primary key associated with a specific table as a numeric array. If there are no primary keys, then the function returns false.
The values of the keys are returned in the native casing of the database. If writing portable applications you should not depend on the case of the value.
If specified, only returns primary keys associated with a table owned by that name.
/* * Connection to DB2 sample database assumed */ $mpk = $db->metaPrimaryKeys('ACT'); print_r($mpk); /* * Prints Array ( [0] => ACTNO ) */