Two dd statements write the same circular code. is one of them not executed? Two dd statements write the same circular code. one dd is displayed as blank $ ztzs $ dbc-& gt; prepare (select & nbsp; * & nbsp; from & nbsp; naszt & nbsp; where & nbsp; 11 & nbsp; and & nbsp; zttype Wei Unicom); $ ztzs-& gt; execute (); & write the same circular code for the two dd statements, is one of them not executed?
Two dd statements write the same circular code, one of which is displayed as blank
$ Ztzs = $ dbc-> prepare ("select * from naszt where 1 = 1 and zttype = ' '");
$ Ztzs-> execute ();
Fetch () {?>
"Target =" _ blank ">
">
Fetch () {?>
"Target =" _ blank ">
">
On the page, one dd is better than displaying any data!
Share: More
------ Solution --------------------
When the first round of while ($ row = $ ztzs-> fetch () ends, the result set is empty (the result set pointer points to the end)
So there is no output in the second round.
You need to round the result set pointer to the beginning!
If your database class does not provide the record locating function, please write it according to the database you are using.
For example, mysql_data_seek