0

I need to get multiple rows with articles where the article IDs are in the list below. (in the string list)

SELECT id, title FROM articles WHERE FIND_IN_SET(id, "1,2,3,4,5,9,25");

How to do that correctly?

acoder
  • 667
  • 2
  • 9
  • 19

1 Answers1

0

Try:

SELECT id, title 
FROM articles 
WHERE FIND_IN_SET(id, '1,2,3,4,5,9,25') <> 0
Giorgos Betsos
  • 71,379
  • 9
  • 63
  • 98