Hello all,
lets say i have a table like this which has 3 columns and 3 rows;
-----------------------------------------------------------+
COLUMN_A.....|.....COLUMN_B.....|...COLUMN_C |
.........X............|...........X............. |.........X...........|
.........X............|...........-...............|.........X...........|
..........-............|...........-...............|.........X...........|
-----------------------------------------------------------+
So, now i have an input like; (user submits a form)
----------------------------------------------------+
......X............|...........X............|..........-.......|
----------------------------------------------------+
now; the first column of row#1 is X so it is same as the input. the 2nd column of row#1 is X so it is also same as the input. and obviously third column of row#1 is not "-" so it is different. So, this row's score is "2".
with same point of view 2nd row's score is "1" (input is matching with only COLUMN_A.)
and finally third row is completely different from input. All columns are differs from input. so its score is "0".
Finally the question is; how can i build this "scoresheet" with a fast sql query.
Thanx in advance.