i have words search 'samsung s3' while have products name in database 'samsung galaxy s3'.
and query :
select * products status=1 , name '%samsung s3%' so getting no result , possible can serach word within name string.
you have use keywords. when save product name able search keywords, add separate keywords want searched with. best way me.
eg: samsung galaxy s3 save 3 entries in keywords table, ie : samsung, galaxy, s3
else can split search string , search each word in db.
eg:
select * products status=1 , (name '%samsung%' or name '%s3%')
there full text search in ms sql. might available in mysql or equivalent.
edit : searched , confirmed full text search exist mysql. here link warned full text search slow. specially if large database.
Comments
Post a Comment