List:General Discussion« Previous MessageNext Message »
From:tidalx Date:June 28 2004 12:00am
Subject:matching any values of a set to any values of another set
View as plain text  
Hi, i am trying to match a set of values to another set of values, and to return true if
any of the values of one set matches any values of the second set.



Something like

SELECT * FROM listings WHERE FIND_IN_SET('Mastercard,Visa', 'AMEX, Cash, Mastercard,
Visa') > 0;

which I don't think works, because find_in_set can't do more than one value or because of
the comma but i can't seem to figure it out using IN, LIKE or other operators/functions.

And the values on both sets are not constant, which confuses me even more.

SELECT * FROM listings WHERE FIND_IN_SET('$payment_type1, $payment_type2',
'$payments_accepted_column') > 0;

Any help is appreciated, thank you



Thread
matching any values of a set to any values of another settidalx28 Jun
  • Re: matching any values of a set to any values of another setMichael Stassen28 Jun