A software to detect changes within to different rows in a table, mysql php
$30-250 USD
W trakcie realizacji
Opublikowano prawie 11 lat temu
$30-250 USD
Płatne przy odbiorze
We need a small php script which connects to a mysql database and checks for differences between two rows.
Assume we have a table as follows:
primary_id, column A, column B
1 10 20
2 15 21
3 15 21
The php function take two inputs: id's to be checked for. If the inputs are to check for differences between id 1 and 2. Then the code will compare row 1 and 2. Assuming we have a change threshold of %10 percent previously set. Then the function will echo that there is a 50% change between row 1 and 2 on column A. It will echo the values 10 and 15 as well. However it will not say anything about column B, because the difference is only 5%.
An important feature has to be that we should not define the columns. The php script should pull all column names by itself and do the comparison on all of them. So if there are 40 columns in a table, it should check all 39 columns except the primary_id column.