我有一个WordPress网站,在主题改变后,我必须修改大约50页上存在的1000个链接的 struct .我想通过PHPMYADMIN用SQL做这件事.
在SQL中,有没有一种方法可以删除我所有具有以下 struct 的链接的结尾:
- <a href="https://website.com/cours/les-problemes/lecon/s1-2014-2015-mathematiques-les-problemes/">
- <a href="https://website.com/cours/la-division/lecon/s3-2014-2015-mathematiques-la-division-n-nakatani/">
- <a href="https://website.com/cours/mathematiques-larithmetique/lecon/201819-s5-fa-mathematiques-nathalie-nakatani/">
为了只得到:
- <a href="https://website.com/cours/les-problemes/">
- <a href="https://website.com/cours/la-division/">
- <a href="https://website.com/cours/mathematiques-larithmetique/">
我试着用这个话题的答案:MYSQL Replace string between two known strings,但我没有设法找到一个符合我目的的解决方案.
我也考虑过分两部分来做: 1-删除‘/lecon/’和‘">’之间的内容. 2-然后完全删除My Pages‘/lecon/’的所有迭代,因为它们只出现在我想要编辑的链接上. 但我的SQL知识有限,我不知道如何做第一部分.
我为我的英语道歉.
非常感谢您的帮助!