Home » Performance » MySQL » Making query shorter
Making query shorter [message #542] Sat, 06 January 2007 19:31 Go to previous message
willybnl2  is currently offline willybnl2
Messages: 6
Registered: December 2006
Junior Member
To search within a database with a lot of text i'm now using

`column` like '%text%'

but this query will also include a lot of words I do not need.
Example:

This is a test
Istesto in abo
Test this phrase

Now when I query it with the above `column` like '%test%' i will get all three... but the 2nd is bogus.

Though i can not do
`column` like '% text%'
including a space, because it would not get the 3rd too...

So the problem is:
How to query using % % (and a third something?) so that it will also get the 3rd result (with the word at the very beginning), but that it will make sure it's a word, not part of the word.


p.s. No I can not use fulltext as the words are to short, this is the backup script if fulltext fails Smile

Read Message
Read Message
Previous Topic:Sphinx and Mysql, Join problems!
Next Topic:InnoDB tablespace inter-version compatibility
Goto Forum:

  


Current Time: Fri Jul 10 01:17:02 EDT 2009

Total time taken to generate the page: 0.02251 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.