gpt4 book ai didi

mysql - 从 SUBSTRING_INDEX 中删除字符

转载 作者:太空宇宙 更新时间:2023-11-03 10:45:55 24 4
gpt4 key购买 nike

我正在反序列化下面的数据

a:7:{s:12:"existingname";s:0:"";s:12:"originalname";s:50:"165074-mort-de-l-historien-jean-pierre-vernant.jpg";s:3:"alt";s:0:"";s:5:"title";s:0:"";s:4:"desc";s:0:"";s:6:"delete";b:0;s:6:"remove";b:0;}

使用这句话

SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(value,';',4),':',-1) AS bookimage 
FROM jksid_flexicontent_fields_item_relations
WHERE jksid_flexicontent_fields_item_relations.field_id = 17
AND jksid_flexicontent_fields_item_relations.ite m_id = 13153

我得到的结果是

"165074-mort-de-l-historien-jean-pierre-vernant.jpg"

如何删除 " 符号?

最佳答案

SELECT REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(value,';',4),':',-1),'"','')  AS bookimage 
FROM jksid_flexicontent_fields_item_relations
WHERE jksid_flexicontent_fields_item_relations.field_id = 17
AND jksid_flexicontent_fields_item_relations.ite m_id = 13153

关于mysql - 从 SUBSTRING_INDEX 中删除字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31787389/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com