SELECT `com`.*, RIGHT(id_panier, 6) as right_val FROM `com` WHERE (etat='attente génération' OR etat='attente envoi' OR etat='non retirée' OR etat='retirée') AND ()