Remove special characters from a database field

前端 未结 10 1688
梦如初夏
梦如初夏 2020-12-06 01:00

I have a database with several thousand records, and I need to strip down one of the fields to ensure that it only contains certain characters (Alphanumeric, spaces, and sin

10条回答
  •  甜味超标
    2020-12-06 01:50

    Have a look at LIB_MYSQLUDF_PREG which needs to be compiled into the MySQL server, but has advanced regular expression facilities such as preg_replace which will help with your task.

提交回复
热议问题