diff options
Diffstat (limited to 'class/CommonTable.php')
-rw-r--r-- | class/CommonTable.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/class/CommonTable.php b/class/CommonTable.php index e049188..8fd0471 100644 --- a/class/CommonTable.php +++ b/class/CommonTable.php @@ -194,13 +194,15 @@ abstract class CommonTable * * @param string $fieldkey name of the field to use as index * @param string $fieldvalue name of the field to use as value + * @param array $crit for request * * @return hashtable */ - public function getHashtable($fieldkey, $fieldvalue) + public function getHashtable($fieldkey, $fieldvalue, array $crit=array()) { - $crit = array('FIELDS' => array($fieldkey, $fieldvalue), - 'ORDER' => $fieldkey); + $crit['FIELDS'] = array($fieldkey, $fieldvalue); + $crit['ORDER'] = $fieldkey; + $tab = array(); foreach ($this->request($crit) as $data) { $tab[$data[$fieldkey]] = $data[$fieldvalue]; |