#1 16. Juni 2012 Band Tour Script - Upcoming Shows / Past Shows sortieren Hallo liebe Community, brauche wieder etwas hilfe. Habe folgendes Script runtergeladen showlister - Browse /showlister at SourceForge.net und wollte fragen ob mir einer aushelfen kann. Beherrsche PHP kaum und würde gerne das er automatisch die Shows, in Past Shows einsortiert welche ein Tag nach dem Datum abgelaufen sind. Muss auch definieren was upcoming und pastshows sind, das programm stellt einfach alles dar. Muss noch einiges anpassen, aber den rest bekomm ich denke ich selbst hin. Vllt. kennt auch einer ein script was besser geeignet ist? Würde mich sehr über hilfe freuen! + Multi-Zitat Zitieren
#2 16. Juni 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren sample_shows_page_005.php all artists, by date [no old shows] sollte doch eigentlich das sein was du suchst 1 Person gefällt das. + Multi-Zitat Zitieren
#3 17. Juni 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Hmm bin ich wirklich so daemlich das ich es ubersehen habe, bin momentan nicht zuhause, werde es mir mal genauer anschauen, gabs da auch eine datei die nur diealten showsanzeigt? + Multi-Zitat Zitieren
#4 17. Juni 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren n e das nicht, sollte aber durch abändern und zusammen kopieren machbar sein + Multi-Zitat Zitieren
#5 20. Juni 2012 Zuletzt von einem Moderator bearbeitet: 14. April 2017 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Habe es nach meinen Wünschen angepasst, ich danke dir nochmal. Jetzt habe ich jedoch ein Problem, was ich seid 2 Stunden nicht behoben bekomme, wahrscheinlich habe ich nicht das auge für. Ich habe immer folgenden Fehler: Eingetragen in der Datenbank ist der 22.09.2012, wird auch dargestellt, und plötzlich, ganz ohne sinn wird der juni dargestellt. Es wird gedoppelt, aber in der Datenbank gibts den 22. Juni nicht als eintrag. Selbst wenn man den eintrag auf 22.10 wechselt bleibt es in der falschen doppelten Anzeige beim Juni. Dies ist der 10. Show Eintrag in der DB, der 11. ist der falsche, der eig. nicht exisitert. Schreibe extra alles auf, da ich echt keine ahnung habe wo der fehler entsteht. Hier der Code Spoiler PHP: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html> <head> <title>Shows</title> <link rel="stylesheet" type="text/css" href="showlister.css"> <head> <body> <?php // read in the connection settings require( "showlister_settings.inc.php" ); require( "showlister_methods.inc.php" ); // connect to the RDBMS $db = mysql_connect ( " $site " , " $user " , " $pass " ) or die_now ( "<h2>Could not connect to database server</h2><p>Check passwords and sockets</p>" ); // select the database mysql_select_db ( " $database " , $db ) or die_now ( "<h2>Could not select database $database </h2><p>Check database name</p>" ); // select all the shows in the database $result = mysql_query ( "select show_id, month, day, year, location, details, venue from $database_table order by year, month, day" , $db ) or die_now ( "<h2>Could not select shows</h2>" ); // set up the table echo( "<div class='box'>\n<h3>Upcoming Shows</h3>\n</div>\n<div class='box'>\n" ); echo( "<table border='0' width='80%'>\n" ); // print the next five shows // thanks to Lee Mikles (lee@getcohesive.com) for contributing the // first version of this code $cur_month = date ( "n" ); $cur_day = date ( "d" ); $cur_year = date ( "Y" ); $event_count = 1 ; // echo out the next five shows while(( $row = mysql_fetch_array ( $result )) and ( $event_count <= 20 )) { $the_id = $row [ "show_id" ]; $the_month = $row [ "month" ]; $the_day = $row [ "day" ]; $the_year = $row [ "year" ]; $the_location = $row [ "location" ]; $the_details = $row [ "details" ]; $the_venue = $row [ "venue" ]; $monate = array( 1 => "Jan" , 2 => "Feb" , 3 => "Mar" , 4 => "Apr" , 5 => "May" , 6 => "Jun" , 7 => "Jul" , 8 => "Aug" , 9 => "Sep" , 10 => "Oct" , 11 => "Nov" , 12 => "Dec" ); $tage = array( 1 => "1st" , 2 => "2nd" , 3 => "3rd" , 4 => "4th" , 5 => "5th" , 6 => "6th" , 7 => "7th" , 8 => "8th" , 9 => "9th" , 10 => "10th" , 11 => "11th" , 12 => "12th" , 13 => "13th" , 14 => "14th" , 15 => "15th" , 16 => "16th" , 17 => "17th" , 18 => "18th" , 19 => "19th" , 20 => "20th" , 21 => "21st" , 22 => "22nd" , 23 => "23rd" , 24 => "24th" , 25 => "25th" , 26 => "26th" , 27 => "27th" , 28 => "28th" , 29 => "29th" , 30 => "30th" , 31 => "31st" ); if (( $the_year > $cur_year )) { // echo shows in current month, today and later echo( "\t\t<td bgolor='navy'>" . "o" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } if (( $the_month > $cur_month ) and ( $the_year = $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td bgolor='navy'>" . "o" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } if (( $the_month = $cur_month ) and ( $the_day >= $cur_day ) and ( $the_year = $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td bgolor='navy'>" . "o" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; }} // close the table echo( "\t</tr></table>\n</div>\n" ); // select the database mysql_select_db ( " $database " , $db ) or die_now ( "<h2>Could not select database $database </h2><p>Check database name</p>" ); // select all the shows in the database $result = mysql_query ( "select show_id, month, day, year, location, details, venue from $database_table order by year, month, day" , $db ) or die_now ( "<h2>Could not select shows</h2>" ); // set up the table echo( "<div class='box'>\n<h3>Past Shows</h3>\n</div>\n<div class='box'>\n" ); echo( "<table border='0' width='80%'>\n" ); // print the next five shows // thanks to Lee Mikles (lee@getcohesive.com) for contributing the // first version of this code $cur_month = date ( "n" ); $cur_day = date ( "d" ); $cur_year = date ( "Y" ); $event_count = 1 ; // echo out the next five shows while(( $row = mysql_fetch_array ( $result )) and ( $event_count <= 20 )) { $the_id = $row [ "show_id" ]; $the_month = $row [ "month" ]; $the_day = $row [ "day" ]; $the_year = $row [ "year" ]; $the_location = $row [ "location" ]; $the_details = $row [ "details" ]; $the_venue = $row [ "venue" ]; if (( $the_month <= $cur_month ) and ( $the_day < $cur_day ) and ( $the_year <= $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td bgolor='navy'>" . "o" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; }} // close the table echo( "\t</tr></table>\n</div>\n" ); ?> </body></html> Als .php bei xup: No File | www.xup.in Tut mir leid, falls es etwas schlampig ist, wie ich bereits sagte, habe ich nie php gelernt Kommentiert habe ich auch nicht, jedoch ist der code so klein, das die übersicht trotzdem vorhanden ist. Was ich geändert habe: -Darstellung in "Datum" @ "Location" - "Stadt" with "andere Bands" -Datum in 1st/2nd/3rd/4th Jan/Feb/Mar/Apr 2012 abgeändert -Upcoming Shows und Past Shows, automatische zuordnung -Sortierung der Shows nach dem Datum, bei den Past Shows in umgekehrter Reihenfolge Hört sich nach wenig an, aber ich saß meine 2 Std. da dran + die Fehler suche und hier und da paar kleine optimierungen ^^ Ich hoffe einer kann mir helfen. Verzweifle dadran, ist bestimmt was kleines/einfaches... PS: Die Originaldatei No File | www.xup.in + Multi-Zitat Zitieren
#6 20. Juni 2012 Zuletzt von einem Moderator bearbeitet: 14. April 2017 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren {img-src: http://z0x.us/image/full/gnsjpg81.jpg} PHP: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <title>Shows</title> <link rel="stylesheet" type="text/css" href="showlister.css"> <head> <body> <?php // read in the connection settings require( "showlister_settings.inc.php" ); require( "showlister_methods.inc.php" ); // connect to the RDBMS $db = mysql_connect ( " $site " , " $user " , " $pass " ) or die_now ( "<h2>Could not connect to database server</h2><p>Check passwords and sockets</p>" ); // select the database mysql_select_db ( " $database " , $db ) or die_now ( "<h2>Could not select database $database </h2><p>Check database name</p>" ); // select all the shows in the database $result = mysql_query ( "select show_id, month, day, year, location, details, venue from $database_table order by year, month, day" , $db ) or die_now ( "<h2>Could not select shows</h2>" ); // set up the table echo( "<div class='box'>\n<h3>Upcoming Shows</h3>\n</div>\n<div class='box'>\n" ); echo( "<table border='0' width='80%'>\n" ); // print the next five shows // thanks to Lee Mikles (lee@getcohesive.com) for contributing the // first version of this code $cur_month = date ( "n" ); $cur_day = date ( "d" ); $cur_year = date ( "Y" ); $event_count = 1 ; // echo out the next five shows while(( $row = mysql_fetch_array ( $result )) and ( $event_count <= 20 )) { $the_id = $row [ "show_id" ]; $the_month = $row [ "month" ]; $the_day = $row [ "day" ]; $the_year = $row [ "year" ]; $the_location = $row [ "location" ]; $the_details = $row [ "details" ]; $the_venue = $row [ "venue" ]; $monate = array( 1 => "Jan" , 2 => "Feb" , 3 => "Mar" , 4 => "Apr" , 5 => "May" , 6 => "Jun" , 7 => "Jul" , 8 => "Aug" , 9 => "Sep" , 10 => "Oct" , 11 => "Nov" , 12 => "Dec" ); $tage = array( 1 => "1st" , 2 => "2nd" , 3 => "3rd" , 4 => "4th" , 5 => "5th" , 6 => "6th" , 7 => "7th" , 8 => "8th" , 9 => "9th" , 10 => "10th" , 11 => "11th" , 12 => "12th" , 13 => "13th" , 14 => "14th" , 15 => "15th" , 16 => "16th" , 17 => "17th" , 18 => "18th" , 19 => "19th" , 20 => "20th" , 21 => "21st" , 22 => "22nd" , 23 => "23rd" , 24 => "24th" , 25 => "25th" , 26 => "26th" , 27 => "27th" , 28 => "28th" , 29 => "29th" , 30 => "30th" , 31 => "31st" ); if (( $the_year > $cur_year )) { // echo shows in current month, today and later echo( "\t\t<td bgolor='navy'>" . "o" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } if (( $the_month > $cur_month ) and ( $the_year = $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td bgolor='navy'>" . "o" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } } // close the table echo( "\t</tr></table>\n</div>\n" ); // select the database mysql_select_db ( " $database " , $db ) or die_now ( "<h2>Could not select database $database </h2><p>Check database name</p>" ); // select all the shows in the database $result = mysql_query ( "select show_id, month, day, year, location, details, venue from $database_table order by year, month, day" , $db ) or die_now ( "<h2>Could not select shows</h2>" ); // set up the table echo( "<div class='box'>\n<h3>Past Shows</h3>\n</div>\n<div class='box'>\n" ); echo( "<table border='0' width='80%'>\n" ); // print the next five shows // thanks to Lee Mikles (lee@getcohesive.com) for contributing the // first version of this code $cur_month = date ( "n" ); $cur_day = date ( "d" ); $cur_year = date ( "Y" ); $event_count = 1 ; // echo out the next five shows while(( $row = mysql_fetch_array ( $result )) and ( $event_count <= 20 )) { $the_id = $row [ "show_id" ]; $the_month = $row [ "month" ]; $the_day = $row [ "day" ]; $the_year = $row [ "year" ]; $the_location = $row [ "location" ]; $the_details = $row [ "details" ]; $the_venue = $row [ "venue" ]; if (( $the_month <= $cur_month ) and ( $the_day < $cur_day ) and ( $the_year <= $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td bgolor='navy'>" . "o" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } } // close the table echo( "\t</tr></table>\n</div>\n" ); ?> </body> </html> + Multi-Zitat Zitieren
#7 26. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren So habe ein neues problem, will bei den upcoming shows ausgeben das keine mehr stattfinden (mit einem else) jedoch gibt der mir die anzahl der events die stattgefunden haben aus als "no upcoming shows". 11 Events in der letzten Zeit, sind die vorbei war vorher upcoming events leer jetzt habe ich ein else eingefügt und es wird mir 11 mal angezeigt "no upcoming shows". Die frage ist wie beschränke ich die echo ausgabe auf einmal, so das es keinen loop für jedes event gibt. Der Part vom code ist der hier: PHP: $cur_month = date ( "n" ); $cur_day = date ( "d" ); $cur_year = date ( "Y" ); $event_count = 1 ; // echo out the next five shows while(( $row = mysql_fetch_array ( $result )) and ( $event_count <= 20 )) { $the_id = $row [ "show_id" ]; $the_month = $row [ "month" ]; $the_day = $row [ "day" ]; $the_year = $row [ "year" ]; $the_location = $row [ "location" ]; $the_details = $row [ "details" ]; $the_venue = $row [ "venue" ]; if (( $the_year > $cur_year )) { // echo shows in current month, today and later echo( "\t\t<td style='border: none' bgolor='navy'>" . "?" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } if (( $the_month > $cur_month ) and ( $the_year == $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>" . "?" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; }if (( $the_month == $cur_month ) and ( $the_day >= $cur_day ) and ( $the_year == $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>" . "?" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } else{ echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>no upcoming shows</td>\n" ); } } // close the table echo( "\t</table>\n" ); echo( "\t</tr></table>\n</div>\n" ); + Multi-Zitat Zitieren
#8 26. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Ich würde einfach einen "boolean" einbauen. Code: // echo out the next five shows $show = false; while(($row = mysql_fetch_array($result)) and ($event_count <= 20)) { // Hier steht anderer Code else { if(!$show) { $show = true; echo("\t<tr>\n"); echo("\t\t<td style='border: none' bgolor='navy'>no upcoming shows</td>\n"); } } + Multi-Zitat Zitieren
#9 26. September 2012 Zuletzt bearbeitet: 26. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Achtung, der Code wird in der Zukunft anders arbeiten als du erwartest, denn Code: for() {} else {} while() else {} foreach() {} else {} wird in der Zukunft valide Syntax sein. PHP: rfc:loop_else Daher lieber gleich richtig: PHP: if ( $result && mysql_num_rows ( $result ) > 0 && $event_count <= 20 ) { while ( $row = mysql_fetch_array ( $result )) { // Hier steht anderer Code }} else { echo "no upcoming shows\n" ; } + Multi-Zitat Zitieren
#10 26. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Die "else" bezieht sich doch nicht auf die "while". Der Aufbau schaut ungefähr so aus. PHP: $show = false ;while(( $row = mysql_fetch_array ( $result )) and ( $event_count <= 20 )){ if( $the_month == $cur_month ) and ( $the_day >= $cur_day ) and ( $the_year == $cur_year ) { //Show gefunden/ausgeben script } else { if(! $show ) { $show = true ; echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>no upcoming shows</td>\n" ); } }} Aber deine Lösung ist eleganter und sieht "schöner" aus + Multi-Zitat Zitieren
#11 26. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren PHP: $cur_month = date ( "n" ); $cur_day = date ( "d" ); $cur_year = date ( "Y" ); $event_count = 1 ; // echo out the next five shows $the_id = $row [ "show_id" ]; $the_month = $row [ "month" ]; $the_day = $row [ "day" ]; $the_year = $row [ "year" ]; $the_location = $row [ "location" ]; $the_details = $row [ "details" ]; $the_venue = $row [ "venue" ]; if ( $result && mysql_num_rows ( $result ) > 0 && $event_count <= 20 ) { while ( $row = mysql_fetch_array ( $result )) { if (( $the_year > $cur_year )) { // echo shows in current month, today and later echo( "\t\t<td style='border: none' bgolor='navy'>" . "᛫" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } if (( $the_month > $cur_month ) and ( $the_year == $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>" . "᛫" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } if (( $the_month == $cur_month ) and ( $the_day >= $cur_day ) and ( $the_year == $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>" . "᛫" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } } else { echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>no upcoming shows</td>\n" ); } Sieht so aus, ich bekomme nur einen weißen Bildschirm, weiß leider nicht woran es liegt... + Multi-Zitat Zitieren
#12 27. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Sehr optimistisch gedacht. Die Neuerrungen, so gut sie auch sind, werden erst in zwei bis drei Jahren wirklich Verbreitung finden (leider). + Multi-Zitat Zitieren
#13 27. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Vll. solltest du den Quellcode mal formatieren, damit man ihn "lesen" kann Dann fällt sofort auf, dass eine Klammer fehlt. das "else" nach dem "while" gibt es noch NICHT! PHP: if ( $result && mysql_num_rows ( $result ) > 0 && $event_count <= 20 ) { while ( $row = mysql_fetch_array ( $result )) { if (( $the_year > $cur_year )) { // echo shows in current month, today and later echo( "\t\t<td style='border: none' bgolor='navy'>" . "᛫" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } if (( $the_month > $cur_month ) and ( $the_year == $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>" . "᛫" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } if (( $the_month == $cur_month ) and ( $the_day >= $cur_day ) and ( $the_year == $cur_year )) { // echo shows in current month, today and later echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>" . "᛫" . " $tage [ $the_day ] " . " " . " $monate [ $the_month ] " . " " . " $the_year " . " " . "@" . " " . "<b> $the_venue " . " " . "-" . " " . " $the_location </b>" . " " . "<i>with" . " " . " $the_details </i></td>\n" ); $event_count ++; } } } else { echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>no upcoming shows</td>\n" ); } + Multi-Zitat Zitieren
#14 27. September 2012 Zuletzt bearbeitet: 27. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Der gibt einfach nichts aus wie vorher, als würde er das else ignorieren. Habe etwas rumexperementiert, aber bin leider nicht auf eine lösung gekommen. PS: mit deinem script geht es bluesin. ( $show = false; ) edit: doch nicht, wenn man eine show hinzufügt bleibt das "no upcoming shows" bestehen und verschwindet nicht. + Multi-Zitat Zitieren
#15 27. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Versuch mal das Script: PHP: $show = false ; while(( $row = mysql_fetch_array ( $result )) and ( $event_count <= 20 )) { if( $the_month == $cur_month ) and ( $the_day >= $cur_day ) and ( $the_year == $cur_year ) { //Show gefunden/ausgeben script $show = true ; } else { if(! $show ) { $show = true ; echo( "\t<tr>\n" ); echo( "\t\t<td style='border: none' bgolor='navy'>no upcoming shows</td>\n" ); } } } + Multi-Zitat Zitieren
#16 27. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren bleibt gleich, no upcoming shows steht da, obwohl es eine show gibt die noch stattfinden wird. + Multi-Zitat Zitieren
#17 27. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Wird die Show den angezeigt, welche noch ansteht? + Multi-Zitat Zitieren
#18 27. September 2012 AW: Band Tour Script - Upcoming Shows / Past Shows sortieren Jap, die steht da auch noch inklusiv no upcoming shows + Multi-Zitat Zitieren