In MySql
kindly tell me how can i do proper search like google in my site
for example user write "asp.net c#"
so i change it like
select * from table where column like '%asp.net%c#%'
but it return only those data where asp.net and c# both exist in title.
but i want it should return all data no problem it contain
just 'asp.net'
or just contain 'c#'
or it contain both 'asp.net c#'
all three type of data should be return so which query should i make fr this.
Loading
Jignesh TrivediPosted Feb 24, 2014, 3:07 AM
hi,
I think full text search may help you
Please refer
http://www.tuxradar.com/practicalphp/9/3/18
http://blog.ericlamb.net/2009/08/full-text-searching-in-mysql/
hope this will help you.
waqas memonPosted Feb 24, 2014, 2:34 AM
Posted Feb 24, 2014, 2:27 AM
You should use or condition.
select * from table where column like '%asp.net%' or column like '%c#%'