Click to See Complete Forum and Search --> : partial mysql search ?


patimages
02-11-2008, 03:13 AM
Hi,

I was wondering whether there was a way to search a database to find a matching string in a better way than what I do... Right now, one can search my database using like like%...%, but let say I search items matching blabla_popo_momo_nono and in my database is popo_momo. The latter will not be found while it could be what I need. What would be the best, fastest and lightest way to find it? Can't figure this one out...

Thanks a lot for any help!!!

Jick
02-11-2008, 03:46 AM
Do not cross-post!
The other thread has been removed...

chazzy
02-11-2008, 07:08 AM
there's no inherent way in mysql to do a reverse match. you'll need to split up the term your searching for (based on the business rules you decide upon) and then do the select.

it's your choice whether to do it in SQL or in your application language. i would recommend the app language, SQL's not known for being fast at basic manipulation.