Forum Moderators: coopster
$query = "select count(*) from tempVotes;";
$result = queryDB(connectDB(), $query);
while($row = $result->fetchRow(DB_FETCHMODE_ASSOC)){
echo("{$row['count(*)']} entries<br><br>");
}//while
//the query to get everything from the tempVotes table
$query = "SELECT * FROM tempVotes order by ipAddress, time desc;";
//$query = "SELECT count(sessionID) from tempVotes where sessionID = '9cs52078qo68881jm97088kd13785dg5290';";
$result = queryDB(connectDB(), $query);
echo("<table>");
while($row = $result->fetchRow(DB_FETCHMODE_ASSOC)){
echo("<tr>");
echo("<td>id: ".$row['voteID']." </td>");
echo("<td>trogdor: ".$row['Trogdor']." </td>");
echo("<td>sun: ".$row['Sun']." </td>");
echo("<td>IP: ".$row['ipAddress']." </td>");
echo("<td>Session: ".$row['sessionID']." </td>");
echo("<td>Browser: ".$row['browserInformation']." </td>");
echo("<td>time: ".$row['time']." </td>");
echo("<td>good: ".$row['good'].";</td>");
echo("</tr><br>");
}//while
echo("</table>");
}//echoTestData
Now I know it works because when I don't echo any HTML it prints the table rows fine. However, once I tried to put them into a table it won't display anything. However if I look at the page source it is all there. Anyone know why. Thanks,