如何使用 PHP Regex 从 MySQL 查询中剥离/删除所有值?
例子:
原文:SELECT id, abc FROM mytable WHERE id IN (12, 15)
条纹:SELECT id, abc FROM mytable WHERE id IN ()
原来的:
SELECT ut.id, IF(stagiaire_devis.id IS NOT NULL, CONCAT(ut.prenom, ' (my lovely)', ut.prenom) AS value FROM quality AS uq, avocate, utility AS ut LEFT JOIN stagiaire_devis ON (stagiaire_devis.id_devis='1293049' AND stagiaire_devis.id_utilisateur=ut.id) WHERE uq.id_utilisateur = ut.id AND avocate.id_utilisateur = ut.id AND avocate.deleted = 0 AND avocate.id_avocat_liste_cabinet = 7 AND uq.id_liste_qualite IN (5,2,9) AND uq.actif = 2 ORDER BY ut.prenom
有条纹的:
SELECT ut.id, IF(stagiaire_devis.id IS NOT NULL, CONCAT(ut.prenom, '', ut.prenom) AS value FROM quality AS uq, avocate, utility AS ut LEFT JOIN stagiaire_devis ON (stagiaire_devis.id_devis='' AND stagiaire_devis.id_utilisateur=ut.id) WHERE uq.id_utilisateur = ut.id AND avocate.id_utilisateur = ut.id AND avocate.deleted = AND avocate.id_avocat_liste_cabinet = AND uq.id_liste_qualite IN () AND uq.actif = ORDER BY ut.prenom
我找不到正确的正则表达式:(