...

View Full Version : having trouble displaying results



kryssy23
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




<body>


<table>
<tr>
<td>Date</td>
<td>Home</td>
<td>Vs</td>
<td>Away</td>
</tr>

</table>
<?php

$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

abduraooft
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)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum