Msg#: 3487891 posted 12:10 am on Oct 26, 2007 (gmt 0)
Hey guys, I havnt been able to figure it out, does anyone have code that compares lets say paragraph of description text to other descriptions in db and selects records that their descriptions are related?
I have been thinking about stripping out certain words, just to keep subject type of words in, but havnt been able to get close.
Msg#: 3487891 posted 8:30 pm on Oct 29, 2007 (gmt 0)
this is kind of slow, but u can try assiging your description paragraph to an array(filter out prepositions 'on' 'in' 'up' etc, conjunctions 'and' 'for' 'nor' 'yet',etc) by using explode() or split(). loop through this array and compare each value to the db with the like% thing like phparion suggested. you're bound to find a lot of results. u can enhance ur results by coding so the result with the most matches go on top.