Hallo!
Ich habe eine MySQL-Abfrage innerhalb einer IF-Abfrage, aber irgendwas funktioniert an dem ganzen nicht
Danke schonmal für eure Antworten!
Ich habe eine MySQL-Abfrage innerhalb einer IF-Abfrage, aber irgendwas funktioniert an dem ganzen nicht

PHP-Code:
if ( ! isset ( $_GET['cat'] ) ) {
$ergebnis = mysql_query ( "SELECT * FROM news ORDER BY id DESC LIMIT $config_newsanzeige" );
} else {
$ergebnis = mysql_query ( "SELECT * FROM news WHERE kategorie = '$cat' ORDER BY id DESC LIMIT $config_newsanzeige" );
}
Kommentar