Searching from comma separated value

后端 未结 5 780
迷失自我
迷失自我 2020-12-21 18:01

This is one of those \'oh my god\' moments.

The previous programmer in our company has left behind a badly-coded application using PHP and MySQL.

One example

5条回答
  •  滥情空心
    2020-12-21 18:59

    What about creating a table that correctly breaks the CSV column into multiple columns (or multiple records) once as a batch process, and then cobbling together an update trigger on the old table to refresh the entry (or entries) for that user? Then you could write decent queries across it without having to re-code the setter logic.

提交回复
热议问题