关键字与数据库值匹配 [英] Keywords Matching With Database Values

查看:116
本文介绍了关键字与数据库值匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在文本框中获得关键词的数量,并将这些关键词与数据库中的同一列进行比较。如果匹配两行或更多行,则应检索该行,如果我将单个关键字作为输入意味着它可以工作,但多个关键字不起作用



I使用split函数拆分关键字,并成功地将这些关键字与数据库值进行匹配。我想在浏览器窗口中显示那些匹配的行信息。同时只显示最后匹配的关键字行信息。我想显示所有匹配的行。如何得到那些结果?

解决方案

试试 MySQL IN条款 [ ^ ]

I get number of key words in textbox and compare those keywords with the same column in the database. If two or more rows are matched ,then that rows should be retrieved, If I give single keyword as input means it works,but more than one keyword not work

I used split function to split the keywords and successfully matched those keywords with database values.I want to display those matching rows information on browser window .While retrieving only last matched keyword row information will be displayed.I want to display all matching rows.How to get those results?

解决方案

Try MySQL IN Clause[^]


这篇关于关键字与数据库值匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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