新增
UPDATE TABLE
SET
`categories` = TRIM(LEADING ',' FROM CONCAT_WS(',',`categories`,'{$category}') )
WHERE
...
移除
UPDATE TABLE
SET
TRIM(BOTH ',' FROM REPLACE(CONCAT(',', categories, ','), ',{$category},', ','))
WHERE
FIND_IN_SET('{$category}', categories)