Final Video Review

Webb-TV.nu – Topplista idag!

//Database query -------------------------------------------------

require("connect.php");

$today = DATE("Y-m-d");

$query = "SELECT DISTINCT program.namn, program.url, program.bild, logo, klick
FROM kanal, program, etikett, programetikett, programklick
WHERE program.kdbnr = kanal.kdbnr
AND program.online LIKE '1'
AND program.namn = programklick.namn
AND program.pdbnr = programetikett.pdbnr
AND programetikett.edbnr = etikett.edbnr
AND etikett.etikett NOT LIKE 'barn'
AND etikett.etikett NOT LIKE 'animerat'
AND etikett.etikett NOT LIKE 'filmat'
AND program.bild NOT LIKE ''
AND klick > ’0′
AND datum = ‘”.$today.”‘
ORDER BY klick DESC
LIMIT 0 , 20 “;

$resultat = mysql_query($query);

$numrows = mysql_num_rows($resultat);

//Popul�ra program saknas ———————–

if ($numrows == 0) {
echo ‘

‘;
echo ‘
‘;
echo ‘

Fler klick krävs….

‘;
echo’

‘;

include (“sections/closediv.html”);
}

$counter = 1;

while ($rad = mysql_fetch_array($resultat)) {

echo ‘

‘;
echo ‘
‘;
echo ‘ logo‘.$rad[namn].’bild

‘ .$counter.’

‘;

echo ‘

‘; ;

$counter = $counter + 1;

}

?>

Leave a Reply