Commit ef37ec7fdb941ae31b4ec3e08da9a0fe4282a372

Authored by michael
1 parent 094b1262

moved lookup_id function to lookup.inc


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@203 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 1 additions and 21 deletions
lib/owl.lib.php
... ... @@ -952,27 +952,7 @@ function group_to_name($id)
952 952 }
953 953 }
954 954  
955   -/**
956   - * Performs an id field lookup on the specified table.
957   - *
958   - * @param $tableName
959   - * the name of table to perform the id lookup.
960   - * @param $fieldName
961   - * the db field to return.
962   - * @param $fieldValue
963   - * the value to perform the lookup for
964   - * @return the id of the row in the db with $fieldName=$fieldValue
965   - */
966   -
967   -function lookup_id($tableName, $fieldName, $fieldValue)
968   -{
969   - $sql = new Owl_DB;
970   - $sql->query("select id from $tableName where $fieldName = '$fieldValue'");
971   - while($sql->next_record())
972   - {
973   - return $sql->f("id");
974   - }
975   -}
  955 +
976 956 //------------------------------------------------------------
977 957 /**
978 958 * Function uid_to_name($id)
... ...