提前搜索的问题 [英] problem in advance search

查看:73
本文介绍了提前搜索的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的搜索代码如下:

I have search code that is below:

展开 | 选择 | Wrap | 行号

推荐答案


搜索''leo dicap''或者dicaprio leonardo它不能显示结果
search ''leo dicap'' or dicaprio leonardo it cant show the result



我必须这样做。我通过使用strtok分隔单词,然后在我调用它们时搜索单词''chunk'来做到这一点。

然后你需要决定两个块还是只有一个必须是一个点击

I had to do this. I did it by seperating the words using strtok, then searching on the word ''chunks'' as I called them.
Then you need to decide whether both chunks or only one has to be a hit


@code green


sory代码绿色,我不清楚你的意思,你能给出一个例子。我是新的PHP
@code green
sory code green, i not clear what you mean, can you give an example.sory, i new in php


从手册

strtok()将字符串拆分为较小的字符串(标记),每个标记由任何字符分隔来自令牌。

也就是说,如果您有一个类似这是一个示例字符串的字符串您可以使用空格字符作为标记,将此字符串标记为单个单词


strtok() splits a string into smaller strings (tokens), with each token being delimited by any character from token.
That is, if you have a string like "This is an example string" you could tokenize this string into its individual words
by using the space character as the token.



然后每个块发出单独的SELECT查询

Then which each chunk issue a separate SELECT query

展开 | 选择 | Wrap | 行号


这篇关于提前搜索的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆