jimbobsquarepants Posted January 18, 2007 Share Posted January 18, 2007 Hi guys,I've had a searchws around abit and couldnt really find anything ....Basicaly i want to search my database .. ive made the query using the like function.In my database i can search on the word 'apple' ... if i search for 'apple' or 'app' or 'ap' or 'le' and so on i find it. But if i search for 'aple' which is nearly right is doesnt find it. Other then obv spelling it right ... is there a way i could use that would find apple even tho its not spelt right??Cheers .... J Link to comment https://forums.phpfreaks.com/topic/34747-mysqlphp-searching/ Share on other sites More sharing options...
jfs0479 Posted January 18, 2007 Share Posted January 18, 2007 im not 100% sure but maybe the system will only allows it if it is in the correct order as you have previously done and they have appeared in that order but around different parts of the words.J Link to comment https://forums.phpfreaks.com/topic/34747-mysqlphp-searching/#findComment-163819 Share on other sites More sharing options...
fenway Posted January 19, 2007 Share Posted January 19, 2007 You can use SOUNDEX(). Link to comment https://forums.phpfreaks.com/topic/34747-mysqlphp-searching/#findComment-164175 Share on other sites More sharing options...
jimbobsquarepants Posted January 19, 2007 Author Share Posted January 19, 2007 Thanks for that guys .... how would i go about using soundex() ??Soz but im still kinda new to php & mysql ... :PCheers ;D Link to comment https://forums.phpfreaks.com/topic/34747-mysqlphp-searching/#findComment-164339 Share on other sites More sharing options...
fenway Posted January 22, 2007 Share Posted January 22, 2007 The refman has some good examples... not that soundex is the best of these types of functions, just the only one that mysql natively supports. Link to comment https://forums.phpfreaks.com/topic/34747-mysqlphp-searching/#findComment-166709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.