Skip to content

Instantly share code, notes, and snippets.

@sixone74
Created July 28, 2010 20:10
Show Gist options
  • Select an option

  • Save sixone74/496087 to your computer and use it in GitHub Desktop.

Select an option

Save sixone74/496087 to your computer and use it in GitHub Desktop.
MySQL REGEX match comma-delimitted list
SELECT * FROM table
WHERE id REGEXP '(,|^){$this->list}(,|$)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment