table a
number in_use
table b
source destination
I'm stuck on trying to join these with out returning multiple rows
select b.source,b.destination where (a.number = b.source and a.in_use = '0') or (a.number = b.destination and a.in_use = '0') limit 1;
but that of course returns two rows. I'm trying to return a single row where neither source or destination is set to '1'
Thanks in advance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
number in_use
table b
source destination
I'm stuck on trying to join these with out returning multiple rows
select b.source,b.destination where (a.number = b.source and a.in_use = '0') or (a.number = b.destination and a.in_use = '0') limit 1;
but that of course returns two rows. I'm trying to return a single row where neither source or destination is set to '1'
Thanks in advance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;