Requirements for idstr1str21saabbb2saabbc3sss123 in the testtable1 table: list the content of & ldquo; str1 & rdquo; segments without duplicates. It would have been a few simple lines, but I think the code can be compressed, so it looks more concentrated, so the cup is
Test. table1 table
| Id |
Str1 |
Str2 |
| 1 |
Saa |
Bbb |
| 2 |
Saa |
Bbc |
| 3 |
Sss |
123 |
Requirement: the content of the "str1" section is not repeated.
It would have been a few simple lines, but I think the code can be compressed, which looks more concentrated, so the Cup will happen. the error code is as follows:
";}?>
Do you see the problem at first glance? This product actually triggers an endless loop... T_T
So I restored it step by step, and the endless loop disappeared. Obviously, it is not a problem to submit statements. it should be a problem with the syntax structure.
Sure enough, the problem lies in while. Each time a condition is detected, mysql_query is executed. Then the cup is ready.
The correct code is as follows:
";}?>
Code optimization, the first of all evil ...... Calm down, calm down!