All pastes #248187 Raw Edit

garr

public text v1 · immutable
#248187 ·published 2006-11-14 10:21 UTC
rendered paste body
$fields = mysql_query( $query ) or die( "<font color=\"ff0000\">" . mysql_error());

echo "<TABLE CLASS=\"bluetable\">\n";

while($row=mysql_fetch_array($fields, MYSQL_ASSOC)) { 

	echo "\t<tr align= \"center\">\n";

	while(list($key, $val) = each($row))  

	{echo "\t\t<td>$key</td>\n";

	}break;

}

mysql_data_seek($fields, 0);

echo "\t</tr>\n";



while ($row=mysql_fetch_array($fields, MYSQL_ASSOC)) {

	echo "\t<tr align= \"center\">\n";

	while(list($key, $val) = each($row))  

	{

		if ($key == Timestamp) {echo "\t\t<td title=\"$key\"> " . date("Y/m/d h:i:s", $val) . "</td>\n";}	

		else {echo "\t\t<td title=\"$key\">$val</td>\n";}

	}

	echo "\t</tr>\n";

}

echo "</table>\n";



mysql_free_result($fields); 

mysql_close($link) or die ("Could not close Connection: '$link' " . mysql_error());

unset($query);



?>