0

My table design:

enter image description here

How to get the records If dates '04-11-2016' OR '11-11-2016' available in week_days column.

Note: The dates are not same, It's have one or more dates.

Actual Query:

SELECT * FROM `sh_products` WHERE FIND_IN_SET('04-11-2016','11-11-2016',week_days);

Expecting Result:

enter image description here

Ramalingam Perumal
  • 1,367
  • 2
  • 17
  • 46

1 Answers1

1

Just OR together two calls to FIND_IN_SET:

SELECT *
FROM sh_products
WHERE FIND_IN_SET('04-11-2016', week_days) > 0 OR
      FIND_IN_SET('11-11-2016', week_days) > 0
Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360