Jump to content

Archived

This topic is now archived and is closed to further replies.

Leslie

SQL search only looks art the first word

Recommended Posts

I've created a search box to search the inventory of product. The results page shows the select statement is like this:

 

SELECT tbID, tbName, tbItemNo, tbThumb, tbCostR FROM tbProduct WHERE tbSearch like '%s%%' AND tbCostR != 'NULL' ORDER BY tbID DESC

 

s% = the search string the visitor entered in the search box

tbSearch has a list of words describing a product

 

The search only finds the first word within the list of words in the tbSearch field of my databank.

 

How can I get the search to go through the whole list within the tbSearch field and pull out all revelent product.

 

For example.....one tbSearch field has: eagle, bird

 

The eagle comes up on the results page if you type eagle in the search box. If you type bird into the search box, nothing appears on the results page.

 

Help!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.