From e87e62d953ec5d4a79390ce28ef88fe43a816473 Mon Sep 17 00:00:00 2001 From: cookie Date: Fri, 10 Nov 2006 19:37:59 +0000 Subject: probleme mit leeren tabellen beseitigt git-svn-id: svn://svn.cccv.de/engel-system@157 29ba0400-6e00-0410-a75a-ca02368028f8 --- www-ssl/inc/funktion_schichtplan_Tage.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'www-ssl/inc') diff --git a/www-ssl/inc/funktion_schichtplan_Tage.php b/www-ssl/inc/funktion_schichtplan_Tage.php index 1d44cb1e..5ac92e7e 100755 --- a/www-ssl/inc/funktion_schichtplan_Tage.php +++ b/www-ssl/inc/funktion_schichtplan_Tage.php @@ -50,8 +50,11 @@ $SQL = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` LIMIT 1"; $Erg = mysql_query($SQL, $con); $Pos=0; -do + +if( mysql_num_rows($Erg)>0) { + do + { //Startdatum einlesen und link ausgeben $DateS = substr(mysql_result($Erg, 0 , 0), 0,10); $VeranstaltungsTage[$Pos++] = $DateS; @@ -77,7 +80,8 @@ do "ORDER BY `DateS` ". "LIMIT 1"; $Erg = mysql_query($SQL, $con); -} while( mysql_fetch_row($Erg) > 0); + } while( mysql_fetch_row($Erg) > 0); +} $VeranstaltungsTageMax = $Pos-1; ?> -- cgit v1.2.3-54-g00ecf