⇦ Back to Table classMethod getKeyName
public mixed
getKeyName
(mixed $multiple = false)
Method to get the primary key field name for the table.
Parameters
- bool $multiple True to return all primary keys (as an array) or false to return just the first one (as a string).
Returns
- mixed Array of primary key field names or string containing the first primary key field.
Since
Method getKeyName - Source code
public function getKeyName($multiple = false)
{
if (\count($this->_tbl_keys)) {
if ($multiple) {
return $this->_tbl_keys;
} else {
return $this->_tbl_keys[0];
}
}
return '';
}