<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
  <meta name="Generator" content="Kopano WebApp v-5.0.0.223+1986.1">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>query database for program currently playing on a channel</title>
</head>
<body>
<p style="padding: 0; margin: 0;"><span style="font-size: 11pt; font-family: arial, helvetica, sans-serif;">Hi all,<br /></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 11pt; font-family: arial, helvetica, sans-serif;"><br /></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 11pt; font-family: arial, helvetica, sans-serif;">I'm looking for some guidance so that when I use my channel change script to select a channel, I can also query the database to find out what is showing on that channel and what time it started - I need my. script to get the rating from the programratings table, which only has chanid and starttime to search on.</span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 11pt; font-family: arial, helvetica, sans-serif;"><br /></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 11pt; font-family: arial, helvetica, sans-serif;">so my query would be something like</span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 11pt; font-family: arial, helvetica, sans-serif;"><br /></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 11pt; font-family: arial, helvetica, sans-serif;">select rating from programrating where programrating.system like "%British%" and starttime like (select starttime from "currently showing program query") and chanid like </span></p>
<p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">(select chanid from channel where channum = "402" and sourceid = 2);</span></p>
<p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span></p>
<p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">Any helpful suggestions?</span></p>
<p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span></p>
<p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span></p>
</body>
</html>