#!/mod/bin/jimsh package require sqlite3 source /mod/var/mongoose/lib/setup require altrow set db [sqlite3.open /var/lib/humaxtv/rsv.db] $db query {attach database '/var/lib/humaxtv/channel.db' as channel} set res [$db query { select *, channel.TBL_SVC.szSvcName, channel.TBL_SVC.usLcn, case when ersvtype > 3 then 1 else 0 end as sort from tbl_reservation left join channel.TBL_SVC on main.TBL_RESERVATION.hSvc = channel.TBL_SVC.hSvc order by sort, nsttime }] puts "
Slot | " puts "Programme | " puts "Duration | " puts "Channel | " puts "Date/Time | " puts "Mode | " puts "Event/Series ID | " puts "{$r(ulslot)} | " puts "$b | $name | " puts "[clock format $r(nduration) -format %T] | " puts "$r(usLcn) | " puts "[string range $r(szSvcName) 1 end] | " if { $r(nsttime) < [clock seconds] } { puts "" } else { puts " | " } puts "[clock format $r(nsttime) -format {%c %Z}] | " puts "$rsvicon $RKIcon | " puts "" set crid [join [lrange [split $r(szCRID) "/"] 1 end]] if {$crid != ""} { puts -nonewline " $r(szCRID)" } puts " | " puts "" } puts "
---|