CommonDBTM::getSearchOptionIDByField PHP Method

getSearchOptionIDByField() public method

Return a search option ID by looking for a value of a specific field and maybe a specific table
public getSearchOptionIDByField ( $field, $value, $table = '' ) : then
$field the field in which looking for the value (for example : table, name, etc)
$value the value to look for in the field
$table the table (default '')
return then search option id, or -1 if not found
    function getSearchOptionIDByField($field, $value, $table = '')
    {
        $tab = $this->getSearchOptionByField($field, $value, $table);
        if (isset($tab['id'])) {
            return $tab['id'];
        }
        return -1;
    }
CommonDBTM