You are here: Re: multi-word query « PHP Programming Language « IT news, forums, messages
Re: multi-word query

Posted by Carl on 08/02/05 04:18

kiqyou_vf wrote:
> I'm sorry, I guess I don't understand.'%interior%' and '%home%' need to
> come from a query entered into a text box, not a pre-defined link.
>
> Is there a way I could put the multi-word search into an array,
> seperated by spaces and make each item in the array print out " LIKE
> '%item1+1%' " with a loop? Does that make sense?
>

I'm not sure I understand what you are asking here, but ill give it
another try based on my understaning of your first post.

If you search using a clause like "%home interior%", you will find
matches that have the phrase "home interior" in the field. If you search
for "'%home%' AND '%interior%' you will get matches that have the
_words_ 'home' and 'interior' in the field, though not necessarily in
that order.

for example:
Select * from table where field like '%home interior%'
matches "new home interior blah" but not "interior ideas for your home".

Select * from table where field like '%home%' and field like '%interior%'
will match both.

I hope that helps.
Carl.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация