Problem mit Funktion
Verfasst: 23.11.2008 11:49
Hallo,
ich schreibe Funktionen in eine Datei functions.php
Will ich nun diese aber aufrufen, wird sie zwar anscheinend ausgeführt, jedoch wird nichts ausgegeben. Die Funktion ist
Der Inhalt der Funktion selbst in die Datei x geschrieben wird dann angezeigt.
Woran könnte das liegen?
ich schreibe Funktionen in eine Datei functions.php
Will ich nun diese aber aufrufen, wird sie zwar anscheinend ausgeführt, jedoch wird nichts ausgegeben. Die Funktion ist
Code: Alles auswählen
function getevents()
{
$verbindung = mysql_connect("localhost","root","");
mysql_select_db("jgr", $verbindung);
$result1 = mysql_query("SELECT * FROM events ORDER BY year, month, day ASC LIMIT 0,6");
$result12 = mysql_fetch_array($result1);
$titel1 = $result12['titel'];
$weekday1 = $result12['weekday'];
$day1 = $result12['day'];
$month1 = $result12['month'];
$year1 = $result12['year'];
$time1 = $result12['zeit'];
$description1 = $result12['description'];
$result2 = mysql_query("SELECT * FROM events ORDER BY year, month, day ASC LIMIT 1,6");
$result22 = mysql_fetch_array($result2);
$titel2 = $result22['titel'];
$weekday2 = $result22['weekday'];
$day2 = $result22['day'];
$month2 = $result22['month'];
$year2 = $result22['year'];
$time2 = $result22['zeit'];
$description2 = $result22['description'];
$result3 = mysql_query("SELECT * FROM events ORDER BY year, month, day ASC LIMIT 2,6");
$result32 = mysql_fetch_array($result3);
$titel3 = $result32['titel'];
$weekday3 = $result32['weekday'];
$day3 = $result32['day'];
$month3 = $result32['month'];
$year3 = $result32['year'];
$time3 = $result32['zeit'];
$description3 = $result32['description'];
$result4 = mysql_query("SELECT * FROM events ORDER BY year, month, day ASC LIMIT 3,6");
$result42 = mysql_fetch_array($result4);
$titel4 = $result42['titel'];
$weekday4 = $result42['weekday'];
$day4 = $result42['day'];
$month4 = $result42['month'];
$year4 = $result42['year'];
$time4 = $result42['zeit'];
$description4 = $result42['description'];
$result5 = mysql_query("SELECT * FROM events ORDER BY year, month, day ASC LIMIT 4,6");
$result52 = mysql_fetch_array($result5);
$titel5 = $result52['titel'];
$weekday5 = $result52['weekday'];
$day5 = $result52['day'];
$month5 = $result52['month'];
$year5 = $result52['year'];
$time5 = $result52['zeit'];
$description5 = $result52['description'];
$result6 = mysql_query("SELECT * FROM events ORDER BY year, month, day ASC LIMIT 5,6");
$result62 = mysql_fetch_array($result6);
$titel6 = $result62['titel'];
$weekday6 = $result62['weekday'];
$day6 = $result62['day'];
$month6 = $result62['month'];
$year6 = $result62['year'];
$time6 = $result62['zeit'];
$description6 = $result62['description'];
$result7 = mysql_query("SELECT * FROM events ORDER BY year, month, day ASC LIMIT 6,6");
$result72 = mysql_fetch_array($result7);
$titel7 = $result72['titel'];
$weekday7 = $result72['weekday'];
$day7 = $result72['day'];
$month7 = $result72['month'];
$year7 = $result72['year'];
$time7 = $result72['zeit'];
$description7 = $result72['description'];
mysql_close($verbindung);
}
Woran könnte das liegen?