0

So what I have is a database of model numbers. What I need to happen is if the model number stored is "ABCD1234" and the user searches "BCD123" it will still return the result. Using "like" works for me if the database entry contains the searched model # at the beginning or the end, but i need something that will return a result anytime the database entry contains the searched numbers.
Thank you!

4

1 に答える 1

1

Envelope the search text with % like:

SELECT * FROM table WHERE model LIKE '%BCD123%';

于 2013-01-04T01:13:55.703 に答える