- mobile DVD listen
Tilbage til forsiden
$db=mysql_connect("sql01.dk", "kjjdk","Fja4Eqp1");
mysql_select_db("kjjdk", $db);
$tema=0;
$tema=$_GET[tema];
// DEBUG
//if ($tema>0)
// printf($tema);
$selectstr="SELECT dvd.titel, personer.init, dvd.id ";
$fromstr="FROM dvd,personer ";
if ($tema>0)
$fromstr .= ",dvdtema ";
$wherestr="WHERE dvd.personid=personer.id ";
if ($tema>0) {
$wherestr .= "AND dvd.id=dvdtema.id ";
if ($tema == 1) // tegnefilm
$wherestr .= "AND dvdtema.tegne=1 ";
if ($tema == 2) // Dansk tale
$wherestr .= "AND dvdtema.dktale=1 ";
if ($tema == 3) // Jim Carrey
$wherestr .= "AND dvdtema.carrey=1 ";
if ($tema == 4) // Danske film
$wherestr .= "AND dvdtema.dansk=1 ";
}
$orderstr = "ORDER BY titel ";
$sqlstr .= $selectstr;
$sqlstr .= $fromstr;
$sqlstr .= $wherestr;
$sqlstr .= $orderstr;
//DEBUG
//printf($sqlstr);
//printf("
");
$result=mysql_query($sqlstr, $db);
$antalnyheder=mysql_num_rows($result);
if ($antalnyheder) {
if ($antalnyheder>$maxnyheder)
for ($n=0; $n<$antalnyheder; $n++) { ?>
printf(" %s", mysql_result($result, $n, "titel")); ?>
$str=mysql_result($result, $n, "init"); ?>
/*printf(" (%s)\n", strtoupper($str)); */?>
/*printf(" %s", mysql_result($result, $n, "id")); */
printf(" info", mysql_result($result, $n, "id"));
?>
}
}
else echo "ups, something went wrong."; ?>
Tilbage
Copyright 2000 DVD-NYT.