Thread: PHP Dump issue.
View Single Post
Old Mar 16th, 2008, 12:38 PM   #1
irish
Programmer
 
Join Date: Nov 2005
Location: Belfast
Posts: 35
Rep Power: 0 irish is an unknown quantity at this point
PHP Dump issue.

I've been trying to dump some info from an SQL Database into a webpage using PHP. My problem is that there is a massive gap appearing at the beginning before the information comes out(see here ignore general appearance, will be fixed afterwards ), I've tried editing the html etc as much as possible but that doesn't affect it, it's the PHP itself I think. Can you find any reason why this code would present that problem?

	
$sql = "SELECT raiders as raiders, spent , earned, balance 
        FROM   raidpoints";

$result = mysql_query($sql);

while ($row = mysql_fetch_assoc($result)) {
	echo '<tr><td width="120" align="center" valign="top">';
	echo $row["raiders"];
	echo '</td>';
	echo '<td width="120" align="center" valign="top">';
	echo $row["spent"];
	echo '</td>';
	echo '<td width="120" align="center" valign="top">';
	echo $row["earned"];
	echo '</td>';
	echo '<td width="120" align="center" valign="top">';
	echo $row["balance"];
	echo '</td></tr><br>';
}

Will also be making the code more efficient afterwards, just need help with the logic of the current code.
irish is offline   Reply With Quote