search in spec. fields

greenspun.com : LUSENET : S-Mart Shopping Cart : One Thread

Hi.

I want to change the script so when a customer search for a product it will only generate products which matches the $name field from the database. ex. if you search for a produkt, let4s say a "madonna" cd. And type "mad" in text-search-box. The search results will also include products with itemid like "mad011" and the product "u2" which have a desciption like "madness".

My database includes 170.000 posts, the searchtime would be much quicker and the searchresults more specific if seachline canbe reduced to one field in the database.

Is there anyone who can help me ?

-- Jens Jonsson (jesse@algonet.se), March 08, 1998

Answers

Hi Jens,

Did you ever figure out a way of doing this? I would also like to do a similar thing. If you did, I'd be grateful if you'd let me know how.

Thanks

Rufus

-- Rufus Biggs (rufus.biggs@themcorporation.com), July 14, 2000.


I did mine in sort of a round about way. I set up a preliminary search in a database that contained only the names, then if someone typed in part of the name it would return only a list of the names, then when they clicked on the name it would go get the entire catalog listing, however mine was a spelling issue, I still had the second search go through the entire database but I don't have nearly the number of items you do, so this solution would only help you with the results being more specific, not the time to search.

-- Rick Clevenger (rick@clevenger.com), July 14, 2000.

Moderation questions? read the FAQ