Wednesday 15 July 2015

mysql - PHP - while mysql_fetch_array loop error? -


I am using this code to show to Administrators users:

  & Lt;? Php while writing (= mysql_fetch_array (mysql_query ("Levels from Levels of Selectors"> ")") {echo ''. Write $ ['username']. ''; }? & Gt;   

But the page is loading forever! What's wrong with this?

This is an infinite loop, you are running the query as much as possible

  $ sql = "select from the selectors where the level> 1"; $ Result = mysql_query ($ sql) or trigger_error ("SQL: $ sql - error:" .mysql_error (), E_USER_ERROR); While writing ($ mysql_fetch_array ($ result)) {write echo $ ['username']; }   

* Obligatory "Switch to PDO / mysqli_" message. *

No comments:

Post a Comment