View Full Version : having trouble displaying results

03-26-2009, 12:15 PM
hey everyone, im having trouble displaying the results from table

table name is round1
col names homeTeam, awayTeam, choice

both the homeTeam and awayTeam col have 8 rows of data already in them but the choice is empty.

nothing at all comes up except for the html table. i hope to have all the data to match the html layout,with the exception of the date

this is what i have so far




$sql = "SELECT homeTeam,awayTeam FROM round1 ";

$results = mysql_query($sql, $dbh) or die (mysql_errno($dbh) . ":" . mysql_error($dbh) );

$row = mysql_fetch_assoc($results);

echo $results;


thanks in advanced for the help

03-26-2009, 01:14 PM
Check the manual to see how to display the data from DB using mysql_fetch_assoc() (http://php.net/mysql_fetch_assoc)