Home » Performance » LAMP » make ranking on search result
make ranking on search result [message #3192] Wed, 18 June 2008 02:29 Go to previous message
larvus  is currently offline larvus
Messages: 5
Registered: June 2008
Location: india
Junior Member

i hv a product table chemicals(prodname,prodcat,proddesc)

my query is


SELECT prodname FROM bw_product WHERE

prodname like '%sodium chloride%'

OR
prodcateg like '%sodium chloride%'

OR
proddesc like '%sodium chloride%'

order by prodname



"sodium chloride" is searched ,
I am getting a very large number of results and the product "sodium chloride" is nowhere near the top.
The search needs to be configured so that exact (or nearly exact) "prodname" appear at the top,exact (or nearly exact) "prodcateg" appear at the next level and the lowest "ranked" results (ones at bottom) should be ones that had a search hit in the "proddesc" field.

how can i possible these ? pls give the correct query


Larvus

Read Message
Read Message
Read Message
Previous Topic:MySQL very slow for big SELECT - Optimize MySQL
Next Topic:mysql tables for nagios
Goto Forum:

  



Current Time: Mon Dec 1 16:46:34 EST 2008

Total time taken to generate the page: 0.02950 seconds
.:: Contact :: Home :: MySQL Support by Percona.com ::.

Powered by: FUDforum 2.7.5.
Copyright ©2001-2006 FUD Forum Bulletin Board Software

MySQL Performance | Forum authority Badge