I have a table with two fields: ID_From, ID_To.
Now the fields are populated like this:
ID_From ID_To
1000 2000
2000 1000
1000 5000
3000 2000
4000 3000
5000 1000
What I would like is to query the database the ID of 1000 and then make it return, how many pairs there are. In this case it would return 2. Quering with ID 2000 would return 1. ID 3000 and 4000 would return zero.
Hope I have made it clear enough. Thanks in advance,
Fischer.
1 Answer