![]() |
| ||
| Help with SQL Query 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. |
| ||
| Re: Help with SQL Query What have you tried so far? |
| ||
| Re: Help with SQL Query I achieved the result by using global arrays (in ASP) not using SQL Query. ... |
| ||
| Re: Help with SQL Query I think you would need to use Stored Procedures for this. Check MySQL Stored Procedures for their usage. |
| All times are GMT -4. The time now is 8:49 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC