Jump to content


SQL search only looks art the first word

  • Please log in to reply
No replies to this topic

#1 Leslie

  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 20 April 2005 - 11:22 PM

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.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users