I have encountered this problem several times and I cannot understand why this is happening. When I create a MySQL statement as shown below, it works fine:
$sql=mysql_query("SELECT * FROM table WHERE id='$something'"); while($row=mysql_fetch_array($sql)){ $someVar=$row['whatever'];
But when I combine the first two operators with the following:
while($row=mysql_fetch_array(mysql_query("SELECT * FROM table WHERE id='$something'")))
and try to skip them, the page seems to work endlessly without loading or returning an error. Why doesn't the second expression work?
source share