Welcome Guest, Not a member yet? Register   Sign In
similar rows with mysql
#1

[eluser]stuffradio[/eluser]
So say I have a table with the field called title.

I want to select all the instances where the title is similar.

Quote:Title:
title 1
John
John 2
This is John 2 the third

How can I do this:
Quote:Title | Count
title 1 | 1
John | 1
John 2 | 2
Of course as you can see, I want to get the similar instances of anything with that remotely resembles John 2.

I'm using this as a way to calculate the most instances of a title.
#2

[eluser]pam81[/eluser]
Hi, well there is a formal way to do this name as inverted index http://en.wikipedia.org/wiki/Inverted_index
it's not very easy! I dont' try it at code igniter or php, but maybe could be some library to work with it.

I hope this helps.
#3

[eluser]Burak Guzel[/eluser]
For finding similar text in MySQL, you can look into this:
http://dev.mysql.com/doc/refman/5.1/en/f...tion_match
#4

[eluser]pickupman[/eluser]
A library written by Jelmer on the boards, has MP_Search that might help get you closer.




Theme © iAndrew 2016 - Forum software by © MyBB