根据输入的字母进行搜索? [英] searching based on the letters entered?

查看:111
本文介绍了根据输入的字母进行搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在数据库中搜索数据.

输入字母时,根据输入的字母,它应将我的结果视图显示为链接.

当我选择该链接时,它应该显示数据库中数据的内容.


这可能吗?

我知道如何搜索单词,但不知道字母搜索.
有人可以帮我这个女警.

预先感谢.

Hi,

I want to search data in a database.

When I am entering letters, and depending upon the letters I have entered, it should display my results view as a link.

When I select that link it should display the contents of the data from the database.


Is this possible?

I know how to search for a word but I don''t know about the letters search.
Could someone help me with this procress.

Thanks in advance.

推荐答案

赞"是一种流行的sql语法运算符,广泛用于对数据库执行搜索操作. Linq To SQL使开发人员的生活变得轻松,可以执行各种数据库操作.如果数据库设计稳定,Linq To SQL将为您完成所有工作,以保持数据关系之间的一致性.
让我们要匹配两个sides(SQL Syntax: "%keyword%"),表示,
如果我们有一个关键字,并且想要所有包含该关键字的结果,并且其前/后都有任何内容,
参考链接:-使用Like运算符的LinQ查询 [文章 [ there-MSDN- [LIKE(Transact-SQL)] [ ^ ]
''Like'' is a popular sql syntax operator, that is used widely for performing search operations on database. Linq To SQL makes a developer''s life easy for performing various database operations. If the database design is stable, Linq To SQL will do all the jobs for you for maintaining consistency between data relations.
let we Want to match both sides(SQL Syntax: "%keyword%"), that means,
If we have a keyword and wants all results that contains this keyword and have anything prior/next to it,
Reference Link :- LinQ Query With Like Operator[^]
This article[^] also might help you.
For More Reference have a look there-MSDN-[LIKE (Transact-SQL)][^]


可能您可以使用 Lucene API进行搜索,它的速度快,功能强大,并且将提供比普通搜索更多的功能.

这里有Lucene可以提供的功能列表:

http://www.simple-talk .com/sql/learn-sql-server/sql-server-full-text-search-language-features/ [ http://www.chrisumbel.com/article/lucene_solr_sql_server [ http://www.ifdefined.com/blog/post/2009/02/Full-Text-Search-in-ASPNET-using-LuceneNET.aspx [ asp.net简单示例中的Lucene.net [ ^ ]

希望对您有所帮助:)
Probably you can use Lucene API for searching , its fast,robust and will provide more features than ordinary search.

There is a list of features you can get with Lucene here:

http://www.simple-talk.com/sql/learn-sql-server/sql-server-full-text-search-language-features/[^]

And try these for implementing:

http://www.chrisumbel.com/article/lucene_solr_sql_server[^]

http://www.ifdefined.com/blog/post/2009/02/Full-Text-Search-in-ASPNET-using-LuceneNET.aspx[^]

Lucene.net in asp.net simple example[^]

hope it helps :)


使用Ajax自动完成扩展器.它将根据您将在文本框中键入的字母从数据库检索值.
Use ajax autocomplete Extender. It will retrieve values from databse based upon the letters that u will type in the text box.


这篇关于根据输入的字母进行搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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