ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:dictionary:metaprimarykeys

This is an old revision of the document!


metaPrimaryKeys

See Also

metaIndexes()

Syntax
  mixed metaPrimaryKeys(
      string $tableName,
      optional string $owner=false,
      )

Description

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.

Optional Parameters

$owner

If specified, only returns primary keys associated with a table owned by that name.

Usage

/*
 * Connection to DB2 sample database assumed
 */
$mpk = $db->metaPrimaryKeys('ACT');
print_r($mpk);
/*
 * Prints 
Array
(
    [0] => ACTNO
)
 
 */
v5/dictionary/metaprimarykeys.1439337984.txt.gz · Last modified: 2017/04/21 11:27 (external edit)