From ef37ec7fdb941ae31b4ec3e08da9a0fe4282a372 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 15 Jan 2003 09:10:54 +0000 Subject: [PATCH] moved lookup_id function to lookup.inc --- lib/owl.lib.php | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/lib/owl.lib.php b/lib/owl.lib.php index b9c0901..50525ed 100755 --- a/lib/owl.lib.php +++ b/lib/owl.lib.php @@ -952,27 +952,7 @@ function group_to_name($id) } } -/** - * Performs an id field lookup on the specified table. - * - * @param $tableName - * the name of table to perform the id lookup. - * @param $fieldName - * the db field to return. - * @param $fieldValue - * the value to perform the lookup for - * @return the id of the row in the db with $fieldName=$fieldValue - */ - -function lookup_id($tableName, $fieldName, $fieldValue) -{ - $sql = new Owl_DB; - $sql->query("select id from $tableName where $fieldName = '$fieldValue'"); - while($sql->next_record()) - { - return $sql->f("id"); - } -} + //------------------------------------------------------------ /** * Function uid_to_name($id) -- libgit2 0.21.4