Jump to content

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!

Link to comment
https://forums.phpfreaks.com/topic/2266-sql-search-only-looks-art-the-first-word/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.