Skip to content

Instantly share code, notes, and snippets.

@rodmcnew
Last active October 10, 2016 13:48
Show Gist options
  • Save rodmcnew/5843c63c0fde486de6f9a19719f6ea2a to your computer and use it in GitHub Desktop.
Save rodmcnew/5843c63c0fde486de6f9a19719f6ea2a to your computer and use it in GitHub Desktop.
mysql - select between xml tags
SELECT
substring_index(substring_index(log, '<FUNTAG>', -1),'</FUNTAG>', 1) as funtag,
substring_index(substring_index(log, '<ANOTHERFUNTAG>', -1),'</ANOTHERFUNTAG>', 1) as anotherfuntag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment