Bonjour,
Comment faire marcher ca ?
UPDATE `tbl_newsletter_user` SET `mailing_recu` = mailing_recu + '\|012' WHERE `email` = '[email protected]'
$req1 = "SELECT mailing_recu FROM tbl_newsletter_user WHERE email = '[email protected]'";
// exécution de la requête et récupération des valeurs
$mailing_recu .= "\|012" ;
$req2 = "UPDATE tbl_newsletter_user SET mailing_recu = $mailing_recu WHERE email = '[email protected]'";<?
$sql4 = "SELECT mailing_recu FROM ".$tbl_newsletter_user." WHERE `email` = '".$user['email']."'";
$req4 = mysql_query($sql4) or die("Erreur SQL ! <BR />".$sql4."<BR />".mysql_error());
$info = mysql_fetch_array($req4);
$mailing_recu = ($info['mailing_recu'] != "") ? $info['mailing_recu']."|".$id_mailing : $id_mailing;
?>
Code : Tout sélectionner
UPDATE tbl_newsletter_user
SET mailing_recu = CONCAT(mailing_recu, '\|012')
WHERE email = '[email protected]'Code : Tout sélectionner
UPDATE tbl_newsletter_user
SET mailing_recu = mailing_recu || '\|012'
WHERE email = '[email protected]'