include("config.php");
if($sql_cache===true){ $sql_c="SQL_CACHE "; }else{ $sql_c=""; }
mysql_connect($dbhost, $dbuser, $dbpass) or die (mysql_error());
mysql_select_db($dbname) or die (mysql_error());
$query1 = "SELECT ".$sql_c."DISTINCT country FROM tvchannels WHERE country <> '' ORDER BY country";
$query2 = "SELECT ".$sql_c."* FROM tvchannels WHERE country <> '' ORDER BY country, channel";
$query3 = "SELECT ".$sql_c."DISTINCT category FROM tvchannels WHERE category <> '' ORDER BY category";
$query4 = "SELECT ".$sql_c."* FROM tvchannels WHERE country <> '' ORDER BY category, channel";
$result1 = mysql_query($query1) or die (mysql_error());
$result2 = mysql_query($query2) or die (mysql_error());
$result3 = mysql_query($query3) or die (mysql_error());
$result4 = mysql_query($query4) or die (mysql_error());
while ($record1 = mysql_fetch_array($result1) ) { $records1[] = $record1; }
while ($record2 = mysql_fetch_array($result2) ) { $records2[] = $record2; }
while ($record3 = mysql_fetch_array($result3) ) { $records3[] = $record3; }
while ($record4 = mysql_fetch_array($result4) ) { $records4[] = $record4; }
?>