ok ich hab diesma ein problem!
also:
der hintergrund der ganzen sache ist: ich möchte für die ersten zehn besten videos eine Award-Grafik anzeigen (mit nem pokal und soo ^^) für jeden der 10 plätze und irgendwie haut dieser code nicht hin: es wird garnix angezeigt!
$var4 = die name des videos das aus der Datenbank ausgelesen wird
PHP
<?php
if(!$award1=mysql_query("SELECT * FROM videos ORDER BY rate DESC LIMIT 1,1")) {
header("Location: errors/cant_load.php");
}
if(!$award2=mysql_query("SELECT * FROM videos ORDER BY rate DESC LIMIT 2,1")) {
header("Location: errors/cant_load.php");
}
if(!$award3=mysql_query("SELECT * FROM videos ORDER BY rate DESC LIMIT 3,1")) {
header("Location: errors/cant_load.php");
}
if(!$award4=mysql_query("SELECT * FROM videos ORDER BY rate DESC LIMIT 4,1")) {
header("Location: errors/cant_load.php");
}
if(!$award5=mysql_query("SELECT * FROM videos ORDER BY rate DESC LIMIT 5,1")) {
header("Location: errors/cant_load.php");
}
if(!$award6=mysql_query("SELECT * FROM videos ORDER BY rate DESC LIMIT 6,1")) {
header("Location: errors/cant_load.php");
}
if(!$award7=mysql_query("SELECT * FROM videos ORDER BY rate DESC LIMIT 7,1")) {
header("Location: errors/cant_load.php");
}
if(!$award8=mysql_query("SELECT * FROM videos ORDER BY rate DESC LIMIT 8,1")) {
header("Location: errors/cant_load.php");
}
if(!$award9=mysql_query("SELECT * FROM videos ORDER BY rate DESC LIMIT 9,1")) {
header("Location: errors/cant_load.php");
}
if(!$award10=mysql_query("SELECT * FROM videos ORDER BY rate DESC LIMIT 10,1")) {
header("Location: errors/cant_load.php");
}
$awa_row1=mysql_fetch_array($award1);
$awa_row2=mysql_fetch_array($award2);
$awa_row3=mysql_fetch_array($award3);
$awa_row4=mysql_fetch_array($award4);
$awa_row5=mysql_fetch_array($award5);
$awa_row6=mysql_fetch_array($award6);
$awa_row7=mysql_fetch_array($award7);
$awa_row8=mysql_fetch_array($award8);
$awa_row9=mysql_fetch_array($award9);
$awa_row10=mysql_fetch_array($award10);
if($awa_row1['title']==$var4) {
echo '[img]image/award/gold1.gif[/img]';
} else if($awa_row2['title']==$var4) {
echo '[img]image/award/gold2.gif[/img]';
} else if($awa_row3['title']==$var4) {
echo '[img]image/award/gold3.gif[/img]';
} else if($awa_row4['title']==$var4) {
echo '[img]image/award/silber1.gif[/img]';
} else if($awa_row5['title']==$var4) {
echo '[img]image/award/silber2.gif[/img]';
} else if($awa_row6['title']==$var4) {
echo '[img]image/award/silber3.gif[/img]';
} else if($awa_row7['title']==$var4) {
echo '[img]image/award/bronze1.gif[/img]';
} else if($awa_row8['title']==$var4) {
echo '[img]image/award/bronze2.gif[/img]';
} else if($awa_row9['title']==$var4) {
echo '[img]image/award/bronze3.gif[/img]';
} else if($awa_row10['title']==$var4) {
echo '[img]image/award/stein.gif[/img]';
}?>
Alles anzeigen
kann mir wer helfen? thxxxx