webif/var/mongoose/lib/findhsvc
hummypkg 1d6917a782 changes for rs
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@328 2a923420-c742-0410-a762-8d5b09965624
2011-08-31 21:47:43 +00:00

42 lines
594 B
Plaintext
Executable File

if {![exists -proc findhsvc]} {
require rsv.class
proc findhsvc {channel} {
global rsvdb
set hsvc [$rsvdb query "
select hSvc
from channel.TBL_SVC
where szSvcName = '$channel'
or szSvcname = '\025$channel'
limit 1
"]
if {[llength $hsvc] == 1} {
return [lindex [lindex $hsvc 0] 1]
} else {
return 0
}
}
proc findhsvcbylcn {lcn} {
global rsvdb
set hsvc [$rsvdb query "
select hSvc
from channel.TBL_SVC
where usLcn = $lcn
limit 1
"]
if {[llength $hsvc] == 1} {
return [lindex [lindex $hsvc 0] 1]
} else {
return 0
}
}
}