0

I have two columns in a table with comma seperated values in each of them .eg. field one is A,B,C and field two is 1,2,3

I want to return A : 1 B: 2 C: 3

Ademaintain
  • 137
  • 2
  • 13
  • @Strawberry How is this a duplicate of the suggested question? The suggested duplicate explains why this is a bad idea, but nowhere does it attempt to answer the OPs question. For all we know this is a large historical dataset that requires unpacking, not some novice design idea. –  Jun 09 '19 at 22:22
  • @ReddHerring You get a vote, I get a vote. – Strawberry Jun 09 '19 at 22:25
  • @ReddHerring ok – Ademaintain Jun 09 '19 at 22:40
  • This is something that should be done in the PHP part of the code rather than in the MySQL part of the code. You would need checks to be sure the number of comma separated elements match. It is also something that is easily done in PHP, and not easily done in MySQL. – Sloan Thrasher Jun 09 '19 at 22:52
  • @SloanThrasher, thanks for the information, thats help better, you are a champion – Ademaintain Jun 10 '19 at 15:53

0 Answers0