Re: FULLTEXT search sorting results

From: Date: Tue, 04 Sep 2001 19:23:52 +0000
Subject: Re: FULLTEXT search sorting results
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65932@lists.php.net to get a copy of this message
Actually it doesn't matter '&&' or 'and' they are equal but I found a solution - I just took away conditions and put this instead $relev = "$title_search+$descr_search+$act_search"; $result = mysql_query("SELECT skits.*,category.*,match (skits.title,skits.descr,skits.skits) against ('$relev') as relevance from skits,category where (skits.title like '%$title_search%' and skits.descr like '%$descr_search%' and skits.skits like '%$act_search%' and skits.lang like '%$lang_search%' and category.kat_name like '%$category_search%') and (skits.category like category.cat_id) ORDER by relevance desc limit $limit,10"); Works fine, (I actually changed '&&' with 'and' as you see) Youri > On Mon, 3 Sep 2001 19:33:38 +0200, BRACK (brak@nettaxi.com) wrote: > >$result = mysql_query("SELECT skits.*,category.*,match > >(skits.title,skits.descr,skits.skits) against ('$relev') as from > > oops, should be 'against ('$relev') as relevance from' > > >skits,category where (skits.title like '%$title_search%' && > > use 'and' instead of && > > >skits.descr like '%$descr_search%' && skits.skits like > >'%$act_search%' && skits.lang like '%$lang_search%' && > >category.kat_name like '%$category_search%') and > >(skits.category like category.cat_id) ORDER by relevance desc > >limit $limit,10"); > > <>< <>< <>< <>< God is our provider ><> ><> ><> ><> http://www.body-builders.org

« previous php.general (#65932) next »