关键字与数据库值匹配

编程入门 行业动态 更新时间:2024-10-28 01:13:16
本文介绍了关键字与数据库值匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

更多推荐

关键字与数据库值匹配

本文发布于:2023-10-23 20:04:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1521872.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:关键字   数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!