Partial searches can be done with 'LIKE', i.e.:

SELECT * FROM yourtable WHERE somefield LIKE '%searchstring%'

The '%' is MySQLs wildcard here, so if you only want strings starting with
your searchstring, use 'searchstring%'


Regards,

Sebastiaan J.A. Kamp

> Hello Matthew
>
> I would be quite interested to know how you managed to make a
> partial search. I built a search engine recently using fulltext, and
> partial searches would never work. Say I type in child, I would never
> get any results with children.
> This is quite weird since you seem to want it the way I had my search,
> but I didnt change any of the settings (left everything at default), and
> still had only exact matches in the output.
> If you find out how to change it either way, please let me know.
> I thought it would not be possible to use partial searches.
>
> Cheers,
> Nessi *amazed* ;)
>
> PS: Maybe its coz my database was very small? Only had about 200
> entries when I started off?
>
>
> At 13:11 26/06/01 , you wrote:
> >We're having quite a lot of difficulty with MySQL's fulltext search. The
> >problem is that it does partial matches. E.g., john matches johnson. Thus
> >a match of author against dickens takes about 0.09 seconds with a 700,000
> >record table, but a match of a shorter word takes a good deal longer - a
> >four-letter word takes several seconds.
> >
> >Does anyone know whether it's possible to change this so substring
matches
> >(such as john against johnson) are NOT made? (Perhaps someone has a patch
> >or a suggestion as to how to make this work.)
> >
> >Also, having incidentally changed ftdefs.h to match 3-letter words, is it
> >now necessary to rebuild the fulltext indexes?
> >
> >
> >
> >=====
> >
> >
> >____________________________________________________________
> >Do You Yahoo!?
> >Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> >or your free @yahoo.ie address at http://mail.yahoo.ie
> >
> >---------------------------------------------------------------------
> >Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> >To request this thread, e-mail <[EMAIL PROTECTED]>
> >To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to