我想从数据库中搜索一个‘无意识自己的’键。如数据库中的内容以下列形式显示:
it。麻绳本身是虚幻的,因为它发现自己被结所束缚。--
,结是桑斯卡,缠绕是灵魂。因为灵魂是无意识的
本身就是上帝,它的注意力仍然集中在结上。要被释放
我使用了以下sql查询来获取我的结果:
SELECT f.content FROM file_details f WHERE REPLACE(f.content, ' ', '') = REPLACE("unconscious of its own Self", ' ', '');没有找到这样的记录。原因是,sql函数替换(f.content、‘’、'')以下列格式转换了我的内容:
"it.Thetwineitselfisinillusionbecauseitfindsitselfboundbyknots.
Theknotsarethesanskarasandthetwineisthesoul.Becausethesoulisunconscious
ofitsownSelfasGod,itsattentionremainsfocussedontheknots.Tobefreed"如果您在上面的内容中替换'unconsciousofitsownSelf‘之后看到我的搜索键,您会发现这是在两个单独的行。这就是为什么我得到了0的结果。
请您为我提供一个解决方案,以搜索我的钥匙,甚至是在单独的行。
发布于 2017-03-09 07:27:56
搜索数据库中是否存在这个单词"unconscious of its own Self":
set @sam = "it. The twine itself is in illusion because it finds itself bound by knots.
The knots are the sanskaras and the twine is the soul. Because the soul is unconscious
of its own Self as God, its attention remains focussed on the knots. To be freed";
select case when rplace like '%52521325241%' then 'found' else 'not found' end) from
(SELECT SOUNDEX(@sam) rplace) as a或者这是第二个选择:
select case when rplace like concat('%',searchChar,'%') then 'found' else 'not found' end,searchChar from
(select SUBSTRING(SOUNDEX('unconscious of its own Self'),2) as searchChar,rplace from
(SELECT SOUNDEX(@sam) rplace) as a) as b;https://stackoverflow.com/questions/42688081
复制相似问题