prcast
April 22nd, 2002, 09:53
i need help get my coding set up right so it will display all entries of a certain series. so far i can just get one entrie per series to display with this code
<?php
mysql_connect();
$result = mysql_db_query("prc","SELECT * FROM episode ORDER BY episodenumber ASC");
while($row = mysql_fetch_array($result)) {
if ($row["series"] == $series) {
$title = $row["title"];
$airdate = $row["airdate"];
$link = $row["link"];
$episodenumber = $row["episodenumber"];
}
}
$result1 = mysql_db_query("prc","SELECT * FROM season");
while($row1 = mysql_fetch_array($result1)) {
if ($row1["series"] == $series) {
$season = $row1["season"];
}
}
if($series == "mmpr") {
echo "<table border=2 cellpadding=2 width=100% bordercolor=#000033><tr><td align=center colspan=3 bgcolor=#000033 height=25><font color=#FFFFFF>";
echo $season;
echo "</font></td></tr><tr><td width=52% bgcolor=#E3E3E3>Name</td><td width=24% bgcolor=#E3E3E3>Number</td><td width=24% bgcolor=#E3E3E3>First U.S. Airdate</td></tr><tr><td colspan=3 height=1><img src=/images/spacer.gif width=1 height=1></td></tr>";
echo "<td width=52%>";
echo "<a href=\"reveiw.php?page=" . $link . "\">" . $title . "</a> ";
echo "</td>";
echo "<td width=24%>";
echo $episodenumber;
echo "</td>";
echo "<td width=24%>";
echo $airdate;
echo "</td>";
echo "</tr></table>";
} else { print "no"; }
mysql_close;
?>
<?php
mysql_connect();
$result = mysql_db_query("prc","SELECT * FROM episode ORDER BY episodenumber ASC");
while($row = mysql_fetch_array($result)) {
if ($row["series"] == $series) {
$title = $row["title"];
$airdate = $row["airdate"];
$link = $row["link"];
$episodenumber = $row["episodenumber"];
}
}
$result1 = mysql_db_query("prc","SELECT * FROM season");
while($row1 = mysql_fetch_array($result1)) {
if ($row1["series"] == $series) {
$season = $row1["season"];
}
}
if($series == "mmpr") {
echo "<table border=2 cellpadding=2 width=100% bordercolor=#000033><tr><td align=center colspan=3 bgcolor=#000033 height=25><font color=#FFFFFF>";
echo $season;
echo "</font></td></tr><tr><td width=52% bgcolor=#E3E3E3>Name</td><td width=24% bgcolor=#E3E3E3>Number</td><td width=24% bgcolor=#E3E3E3>First U.S. Airdate</td></tr><tr><td colspan=3 height=1><img src=/images/spacer.gif width=1 height=1></td></tr>";
echo "<td width=52%>";
echo "<a href=\"reveiw.php?page=" . $link . "\">" . $title . "</a> ";
echo "</td>";
echo "<td width=24%>";
echo $episodenumber;
echo "</td>";
echo "<td width=24%>";
echo $airdate;
echo "</td>";
echo "</tr></table>";
} else { print "no"; }
mysql_close;
?>