Hi there,
Could you please help me to find-out the solution?
I need to use "LIKE" command of mysql.
Below are title from a Product table. If i search for "Alarm" then it should show me result only for title which has word alarm. (0th and 2nd only)
table_name = product
Column_name = title
0 ->Casio G-Shock Velocity Indicator Alarm watch
1 ->Seiko Velatura Tachymeter Chronograph watch
2 ->Citizen promaster Alarm perpetual watch
Thank you in anticipation
"LIKE" command of mysql for searching?
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: "LIKE" command of mysql for searching?
% is the wildcard character form LIKE, so:
SELECT title FROM product WHERE title LIKE '%Alarm%';
SELECT title FROM product WHERE title LIKE '%Alarm%';
(#10850)