Home >Backend Development >PHP Tutorial >mysql group by grouping problem.
As shown in the picture, want to split the data in the number field by commas and then group it?
For example, there may be only 3 pictures with content 12, and 1 picture with content 123. Seeking a master online (disregarding table splitting and other storage methods for grouping)
As shown in the picture, want to split the data in the number field by commas and then group it?
For example, there may be only 3 pictures with content 12, and 1 picture with content 123. Seeking a master online (disregarding table splitting and other storage methods for grouping)
mysql
has a function: find_in_set
. The specific usage is as follows:
<code>select id from table where FIND_IN_SET('12',number); </code>
The above sentence can extract the ID set with number 12.
I looked at the find_in_set upstairs, but I haven’t used it before. I found this article, which is very well written:
https://segmentfault.com/a/11...