Unsuccessful query - DOH!";
} else {
echo "Successful query!
";
}
*/
//mysql_query($query);
//$result = mysql_store_result($result);
//echo "
Result is $result";
$num_sermons = mysql_num_rows($result);
//echo "
| Found $num_sermons sermons. |
";
for ($i=0; $i < $num_sermons; $i++) {
$row = mysql_fetch_array($result);
echo "";
echo htmlspecialchars(stripslashes($row["title"]));
echo " ";
// the sermonid field is in MMDDYYY format; the following lines
// parse it out into its components, then echoes them
$date = stripslashes($row["sermonid"]);
$month = substr($date, 0, 2);
$day = substr($date, 2, 2);
$year = substr($date, -4);
echo "$month-$day-$year ";
echo htmlspecialchars(stripslashes($row["speaker"]));
echo ' ';
echo htmlspecialchars(stripslashes($row["description"]));
echo " ";
// parsing for number of formats
if ($row["formats"] == "1") {
echo ' |  | ';
} else if ($row["formats"] == "2") {
echo '
| ';
echo ' | ';
} else if ($row["formats"] == "3") {
echo ' | ';
echo ' | ';
}
echo "
";
}
?>
| Top of Page |