Say, for example, I have one row.. that looks like.
1372903478947385689346598346563489563498563
4573405734095834905834905803495834907590347
5345439573490753490753490750934750937590347
5435349057349057349073094839084903284093284
I will try and compare that with the other rows in the database. This is actually a form algorythm that these numbers are converted from. (Each number has something to do with a word that is found in the algorythm, but again I cannot say anything about that - it was give the whole concept up.) -
So, what I will be doing is:
Take Database Row 1:
1372903478947385689346598346563489563498563
4573405734095834905834905803495834907590347
5345439573490753490753490750934750937590347
5435349057349057349073094839084903284093284
Compare it with Database Row 2:
1372903478947349058349058034958349038568934
6598346563489563498563457340573409587590347
5345439573490753490753490750934750937590347
543534905734905734907309483908490328 you4093284
As will see, it looks a lot the same - but it's 'not'. I want to see how many #'s in a row are the same, and I want to keep a running total throughout the search. Like here's 1+1+1+1+1+1+1+1+1+1+1+1 in a row.. oh wait there's a different one.. dont count it.. .. keep adding along with out total 1+1+1+1+1+1+1+1.. ope, there's another not the same..aaaannd back to normal 1+1+1+1+1.
So throughout that count we got..25 numbers that matched up according to my standards. I kept a running total of consecutives.
If it helps you out, I'll do this in coke, pepsi, and dew so you can understand the #'s.
#1
c,p,d,d,c,d,c,c,p,p,p,p,p,p,a,a,a,a
#2
c,p,c,c,c,d,c,c,p,d,d,a,a,c,c,a,a,a,a
Now if you do the comparison:
1 2
c c .. That's one
p p .. Another one
d c .. Not one,... so our count is still two
d c .. Not one...our count is still two
c c .. There is one - it's a count of three
d d .. there's our fourth
c c .. a 5th
c c .. 6th
p p .. 7th
p d .. NO! .. we stil only have 7
p d .. still no
p a .. nope
p a .. no
p c ..no
a c ..no
a a .. 8TH!!!
a a ..9th
a a ..10th
So, out of 18 comparisons, we only got a total of 10 run consecutives. Later on, I will devide this number and get a percentage of match.. and in this case it's like 55% match. But I'm not worried about the percentage yet.
Any clue how to compare it like so?