Tongda OA is a case of abnormal debugging of a Data loop output program (via text ).
Today, a friend in the secondary development and exchange group of Tongda OA asked this question. After connecting to the database through code, the data in the database can be displayed normally, but the code output by loop can only output a single row of data, there are actually multiple data records in the data table. Why does the loop fail?
<? Include_once ("inc/conn. php "); // if you need to connect to the database, it contains include_once (" inc/utility_all.php "); // if you need to use a public function, it contains include_once (" inc/check_type.php "); // if you need to use the type check function, include // If auth is already included. php, you do not need to include conn. php?> <Html> Streamline the Code:
<? Include_once ("inc/conn. php"); // if you need to connect to the database, include?> <? Php $ query = "select * from flow_data_50 order by id desc"; $ cursor = exequery ($ connection, $ query); while ($ ROW = mysql_fetch_array ($ cursor )); {echo "I = ". $ ROW ['id'] ;}?>
The final result is that a semicolon is added at the end of the while row, which is equivalent to the end of the loop by this line, and there is no recycling in the future, and the braces are not the same as while. So far, find the cause and solve the problem.