相关疑难解决方法(0)

从记录中删除HTML标记

需要帮助从具有下面内容的表一列形成MYSQL查询

Row1 : this is first <a href='mytext.txt'>row</a> from the table

Row 2 : THis is the second row <img src ='mytext.jpg'> my image is there

Row 3 : <p>This is the Third row my mytext is there </p>

Row 4 : <p class='te_mytext'>This is the Third row my text is there </p>

这是我尝试将关键字搜索为'mytext'的表格行

我的疑问是

SELECT * from table  WHERE colmn_name ` like '%mytext%' "
Run Code Online (Sandbox Code Playgroud)

我会得到所有4行,但结果是错误的.我需要得到正确的输出只有第3行.这一行只有内容中的mytext所有其他内容的原因不在于内容,而是mytext在所有行中

如何编写MySQL查询?

mysql

24
推荐指数
5
解决办法
7万
查看次数

标签 统计

mysql ×1