-
-
Save anonymous/063f41840ccff44c9a11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$query = new data_DataBaseQuery(); | |
$SQL = "Select name from ima_supplier"; | |
if ($query->doQuery($SQL) && $query->num_rows()) { | |
$rows = $query->fetch_all(); | |
$anz = count ( $rows ); | |
for($i = 0; $i < $anz; $i ++) { | |
for($j = 0; $j < $anz; $j ++) { | |
if ($i !== $j) { | |
similar_text ( $rows [$i] ['name'], $rows [$j] ['name'], $percent); | |
if($percent >= 90) { | |
$duplicate = array($this) ; | |
} | |
} | |
} | |
} | |
echo $duplicate; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment