Hello,
I am tring to get some results from my database and get the following error:<br>
Warning: 0 is not a MySQL result index<br>
Here is a bit of the code I am using:<br><br>
echo "<tr><td bgcolor=\"#c0c0c0\" id=\"sm\">date/time</td><td bgcolor=\"#c0c0c0\" id=\"sm\">vs</td><td bgcolor=\"#c0c0c0\" id=\"sm\">location</td><td bgcolor=\"#c0c0c0\" id=\"sm\">comments</td></tr>\n";
$sched_sql = "SELECT matches.mtno, MONTH(datetime) as month, DAYOFMONTH(datetime) as day, HOUR(datetime) as hour, MINUTE(datetime) as minute, matches.location, matches.comments, matches.tournament, matches.title, teams.school FROM matches, match2, teams WHERE matches.mtno=match2.mtno AND match2.tmn=teams.tmn AND match2.tmn=\"$tmn\" ORDER BY datetime";
$sched_result = mysql_query($sched_sql);
while($sched_r = mysql_fetch_array($sched_result)){
$mtno = $sched_r['mtno'];
$month = $sched_r['month'];
$day = $sched_r['day'];
$hour_o = $sched_r['hour'];
$minute_o = $sched_r['minute'];
$location = $sched_r['location'];
$comments = $sched_r['comments'];
$title = $sched_r['title'];
$school = $sched_r['school'];
echo "<tr><td id=sm nowrap>";
if ($hour_o > 12) {
$hour = $hour_o - 12;
$ampm = "p.m.";
} else {
$hour = $hour_o;
$ampm = "a.m.";
}<br>
<br>
I am at a complete loss for an answer any and all help is greatly appreciated.<br><br>
Thanks in Advance,<br>
Chris
I am tring to get some results from my database and get the following error:<br>
Warning: 0 is not a MySQL result index<br>
Here is a bit of the code I am using:<br><br>
echo "<tr><td bgcolor=\"#c0c0c0\" id=\"sm\">date/time</td><td bgcolor=\"#c0c0c0\" id=\"sm\">vs</td><td bgcolor=\"#c0c0c0\" id=\"sm\">location</td><td bgcolor=\"#c0c0c0\" id=\"sm\">comments</td></tr>\n";
$sched_sql = "SELECT matches.mtno, MONTH(datetime) as month, DAYOFMONTH(datetime) as day, HOUR(datetime) as hour, MINUTE(datetime) as minute, matches.location, matches.comments, matches.tournament, matches.title, teams.school FROM matches, match2, teams WHERE matches.mtno=match2.mtno AND match2.tmn=teams.tmn AND match2.tmn=\"$tmn\" ORDER BY datetime";
$sched_result = mysql_query($sched_sql);
while($sched_r = mysql_fetch_array($sched_result)){
$mtno = $sched_r['mtno'];
$month = $sched_r['month'];
$day = $sched_r['day'];
$hour_o = $sched_r['hour'];
$minute_o = $sched_r['minute'];
$location = $sched_r['location'];
$comments = $sched_r['comments'];
$title = $sched_r['title'];
$school = $sched_r['school'];
echo "<tr><td id=sm nowrap>";
if ($hour_o > 12) {
$hour = $hour_o - 12;
$ampm = "p.m.";
} else {
$hour = $hour_o;
$ampm = "a.m.";
}<br>
<br>
I am at a complete loss for an answer any and all help is greatly appreciated.<br><br>
Thanks in Advance,<br>
Chris