Forums
This topic is locked
search
20 Jun 2006 06:37:04 soul here posted:
alo..im working on my search in my web application.the problem is.the search only return me the result if the keyword enter match.if in the database table,the thing that i want to search is Liverpool FC but when i type liverpool the search result show no result. Replies
Replied 03 Jul 2006 00:24:57
03 Jul 2006 00:24:57 dave blohm replied:
you using MS SQL for the DB?
Replied 03 Jul 2006 00:43:57
03 Jul 2006 00:43:57 Charles Harford replied:
use the 'LIKE' method in your sql WHERE query. Check it out here:
www.w3schools.com/sql/sql_where.asp
Remember to take care where you place the percent symbols.
e.g.
SELECT * FROM YourTable
WHERE YourField LIKE '%yourSearch%'
Hope this helps
www.w3schools.com/sql/sql_where.asp
Remember to take care where you place the percent symbols.
e.g.
SELECT * FROM YourTable
WHERE YourField LIKE '%yourSearch%'
Hope this helps