0

How can I implement search functionality other than SQLQuery, Joins and conditional querys?

1
  • 3
    You should state what is your goal, then we can help with how it can be done. Commented Nov 24, 2009 at 5:34

3 Answers 3

1

The simpliest way is to use like condition:

select * from Table where fieldName like '%searchword%'

But it's very slow, so it's better to use full-text indexing: in mysql, in sql server

Sign up to request clarification or add additional context in comments.

Comments

0

Well, outside of SQL, you're left to the calling application to do searches. Definitely not the recommended choice if you can avoid it as you'll have to read all data first before searching it; indexing is a very powerful feature for databases.

If you want to display all data and then manipulate/sort/filter it, however, this method has its place.

Perhaps you wish to clarify your question as to what you're looking to accomplish?

Comments

0

It's better to use something like sphinx or solr to implement a real search engine rather than using things that most databases provide, even mysql's full-text search.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.