My MYSQL & PHP while code is out of memory, when there is only one row
- by Sam
Hey all,
why is this code throwing an out of memory error, when there is only 1 row in the database..
$request_db = mysql_query("SELECT * FROM requests
WHERE haveplayed='0'") or die(mysql_error());
$request = mysql_fetch_array( $request_db );
echo "<table border=\"1\" align=\"center\">";
while ( $request['haveplayed'] == "0" ) {
echo "<tr><td>";
echo $request['SongName'];
echo "</td><td>";
echo "<tr><td>";
echo $request['Artist'];
echo "</td><td>";
echo "<tr><td>";
echo $request['DedicatedTo'];
echo "</td><td>";
}
echo "</table>";
Thanks.