In my user table, I have a userid column, and membergroupids column. Here is the query I have so far.
UPDATE `user`
SET `membergroupids`=`,100`
WHERE `userid` IN
(
312 , 331 , 538 , 528 , 77 , 80 , 293 , 343 , 609 , 607 , 547 , 596 , 216 ,
780 , 1 , 884 , 430 , 500 , 881 , 952 , 957 , 979 , 352 , 994 , 955 , 776 ,
744 , 904 , 1038 , 76 , 1083 , 61 , 202 , 1001 , 1173 , 1176 , 418 , 770 ,
1192 , 191 , 1211 , 1206 , 1247 , 402 , 423 , 584 , 1233.1282 , 167 , 1329,
1330 , 376 , 1227 , 146 , 1113 , 1327 , 1352 , 254 , 1065 , 1406 , 1225 ,
1230 , 1405 , 1443 , 812 , 1295 , 1510 , 1571 , 1565 , 1468 , 1349 , 1645 ,
501 , 1312 , 1718 , 13 , 200 , 1177 , 1785 , 107 , 540 , 1591 , 1508 , 59 ,
1867 , 222 , 1520 , 782 , 26 , 332 , 474 , 1837 , 1828 , 1431 , 1951 , 1953 ,
1950 , 847 , 1477 , 1726 , 1669 , 1185 , 1955 , 1872 , 1926 , 1392 , 853 ,
1892 , 2020 , 1511 , 2027 , 2197 , 2184 , 2134 , 2239 , 119 , 122
)
So basically, what I am trying to do is.. I am trying to make it so the query adds ",100" to the column membergroupids if their userid is one of the ones listed in ().
However, here is the thing. All of these users already have values listed in membergroupids.
For example, the user 312 has these values already in the column membergroupids:
35,49,58,61,71,38,59
So, this query needs to do this to his field:
35,49,58,61,71,38,59,100
..and for all of the other userids listed.
Thanks if anyone can help me. I'm sure this is on google but I didn't know how to word it.