0

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.

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by verruckt24
0

I achieved the result by using global arrays (in ASP) not using SQL Query.
...

0

I think you would need to use Stored Procedures for this. Check MySQL Stored Procedures for their usage.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.