gpt4 book ai didi

mysql:转身就好

转载 作者:太空宇宙 更新时间:2023-11-03 11:03:09 26 4
gpt4 key购买 nike

我有一张这样的 table

id, title1, hello world2, world hello

and i like to search for all ids that matches this php expression:

$searchstring = "hello world is yours"
if (strstr($searchstring,mysql(title)){echo found}

在mysql中我经常使用这个:

select id from table where title LIKE '%....%'

但我需要它的另一边:

select id from table where "hello word is yours" LIKE %title%

结果必须是id 1 "hello word"

谁能告诉我正确的语法?

最佳答案

select id from table
where 'hello word is yours' LIKE concat('%', replace(title, ' ', '%'), '%')

关于mysql:转身就好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14218567/

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