Hi
I have a problem with the result of two calendar-pages. The first showing a simple list from the DB, linking to the second page showing detailed info of the selected event.
The unique variable from the DB is called "nr".
It is from this ID that I try to get the event_details shown in a new page:
$QUERY = mysql_query("SELECT * FROM kalender ORDER by dato");
$NUMROWS = mysql_num_rows($QUERY);
if ($NUMROWS) {
$I = 0;
while ($I < $NUMROWS) {
$dato = mysql_result($QUERY,$I,"dato");
$sted = mysql_result($QUERY,$I,"sted");
$titel = mysql_result($QUERY,$I,"titel");
$nr = mysql_result($QUERY,$I,"nr");
echo "$dato";
echo "$sted";
echo "<a href=\"event_details.php?id=$nr\">$titel</a>";
$I++;}}
...and then comes the trouble in a result resource Warning:
$QUERY = mysql_query("SELECT * FROM kalender WHERE id='$nr'");
while ($DATA = mysql_fetch_row($QUERY))
echo "<center><u><b>$DATA[2]</u></b><br>$DATA[3]<br></center>";
echo "<table align=\"center\" width=\"50%\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">";
echo "<tr><td>Sted:</td><td>$DATA[4]</td></tr>";
echo "<tr><td>Beskrivelse:</td><td>$DATA[2]</td></tr>";
echo "<tr><td>Person:</td><td>$DATA[5]</td></tr>";
echo "<tr><td>Info:</td><td>$DATA[6]</td></tr>";
Can U see whats the prob? Think it must be with the fetch_row()
Thanx a lot...
Eilertsen😕