Apparently, I had some invisible "gremlins" that only showed up when I cut and pasted... Now, I'm not returning an error -- the table looks like it's pulling the correct number of lines, but nothing will display. Here's more of the PHP code on the page:
$i = 0;
// get all pending items and load them into an array
$result = mysql("$DBName","SELECT CalendarDetailsID FROM phpCalendar_Daily WHERE Active = '1'") or die(mysql_error());
while ($row = mysql_fetch_row($result)) {
$ID[$i] = $row[0];
$i++;
}
// walk through the array and form a query set
for ($j = 0; $ID[$j]; $j++) {
$query .= " OR det.CalendarDetailsID = '$ID[$j]'";
}
$query = ereg_replace("^ OR ","",$query);
if (!$query) {
echo "No events were found";
exit;
}
?>
<table border="0" cellpadding="8" cellspacing="0">
<?
$result = mysql("$DBName","SELECT dai.StartDate, det.Title, det.Location, det.CalendarDetailsID FROM phpCalendar_Details det
INNER JOIN phpCalendar_Daily dai ON det.CalendarDetailsID = dai.CalendarDetailsID
WHERE (".$query.") ORDER BY det.CalendarDetailsID") or die(mysql_error());
while ($row = mysql_fetch_row($result)) {
$CeCI = $row['CalendarDetailsID'];
$CeSt = $row['StartDate'];
$CeTi = $row['Title'];
$CeLo = $row['Location'];
if (strlen($CeTi) > 15) {
$CeTi = substr($CeTi,0,14)."...";
}
echo "<tr>
<td valign=\"top\" class=small>$CeCI</td>
<form action=\"editcalendar.php\" method=\"post\" target=\"main\"><input type=\"hidden\" name=\"CalendarDetailsID\" value=\"$CeCI\">
<td valign=\"top\"><input type=\"submit\" value=\"Edit\"></td></form>
<form action=\"deletecalendar.php\" method=\"post\" target=\"main\"><input type=\"hidden\" name=\"CalendarDetailsID\" value=\"$CeCI\">
<td valign=\"top\"><input type=\"submit\" value=\"Delete\"></td></form>
<td valign=\"top\" class=small>$CeSt</td>
<td valign=\"top\" class=small>$CeTi</td>
<td valign=\"top\" class=small>$CeLo</td>
</tr>\n\n";
}
?>
</table>