UNB Components Code Reference

UnbDatabase::ResetKeylistKeys method

Removes all keys from a key list and set new keys.

public function UnbDatabase::ResetKeylistKeys ($tableName, $columnName, $idColumn, $idValue, $keys);

Parameters

tableName
(string) Table in which the key list is referenced
columnName
(string) Column which contains the key list ID reference
idColumn
(string) Identifier column (primary key) of the table
idValue
(int/string) Identifier value of the table, describing the record that references the key list
keys
(array(int/UnbUser)) New keys. Set this to null to only remove all keys.

Remarks

This function reads the currently assigned key list ID from tableName.columnName where idColumn is idValue and removes the key from this key list. If the key list is then empty, the reference is deleted (set to null) in tableName.columnName.

Exceptions thrown

InvalidArgumentException On invalid argument type or value.
UnbDatabaseException No description available.

Member of class: UnbDatabase

Implementation file: database.class.php, line 940

© 2010 Yves Goergen. UNB Components Homepage. Reference generated on 2010-03-07.