Explode query

danielos77 Posted messages 114 Registration date   Status Member Last intervention   -  
Hello,

From a table with two columns (Mail and ColonneAExploder). The rows for Mail contain email addresses and the ColonneAExploder field contains text like "word1, word2, word3".

I’m looking, with a variable ($var) for example containing the text "word2", to send an email (using phpMailer) to the addresses that have "word2" in the records of ColonneAExploder.

[Code snippet with PHP pseudocode is provided, attempting to explode ColonneAExploder values and then select emails where the exploded value equals $var, and send to those addresses.]

Is this the right method?

Thanks,
Daniel