$result function = having trouble making a table
Posted: Thu Mar 25, 2004 4:15 pm
trying to make a table from using the $result function, having trouble getting the data to feed in where I need to go. Major props to Mark last night who helped me with the below code. I never used the Result function, and having trouble figuring out how it feeds into a table here is my code
TABLE JUNK IS HERE IS HERE
<?
// Display requested entries
while ( $row = mysql_fetch_array($result))
{
echo "<tr><td bgcolor=CCCCCC>$row[against]</td><td bgcolor=CCCCCC>$row[ab]</td><td bgcolor=CCCCCC>$row[h]</td><tr><td bgcolor=CCCCCC>$row[hr]</td><td bgcolor=CCCCCC>$row[rbi]</td><td bgcolor=CCCCCC>$row[doubles]</td><tr><td bgcolor=CCCCCC>$row[triples]</td><td bgcolor=CCCCCC>$row[r]</td><td bgcolor=CCCCCC>$row[sb]</td></tr>";
}
?>
-----------------------------------------------
I'm guessing there is soemthing wrong in the echo. I am trying to get the data to fill out all on one line, then the next set of data for that ID right udner it,,,it is coming out all messed up like this
http://www.becauseitscool.com/hitplayer.php?hit_id=55
Thanks in advance
TABLE JUNK IS HERE IS HERE
<?
// Display requested entries
while ( $row = mysql_fetch_array($result))
{
echo "<tr><td bgcolor=CCCCCC>$row[against]</td><td bgcolor=CCCCCC>$row[ab]</td><td bgcolor=CCCCCC>$row[h]</td><tr><td bgcolor=CCCCCC>$row[hr]</td><td bgcolor=CCCCCC>$row[rbi]</td><td bgcolor=CCCCCC>$row[doubles]</td><tr><td bgcolor=CCCCCC>$row[triples]</td><td bgcolor=CCCCCC>$row[r]</td><td bgcolor=CCCCCC>$row[sb]</td></tr>";
}
?>
-----------------------------------------------
I'm guessing there is soemthing wrong in the echo. I am trying to get the data to fill out all on one line, then the next set of data for that ID right udner it,,,it is coming out all messed up like this
http://www.becauseitscool.com/hitplayer.php?hit_id=55
Thanks in advance