Code : Tout sélectionner
CREATE TABLE `personne` (
`id` int(11) NOT NULL auto_increment,
`nom` varchar(100) default NULL,
`prenom` text,
`date_paiement` date(11) unsigned NOT NULL default '0',
`id_produit` int(11) NOT NULL auto_increment,
`paiement` int(11) NOT NULL auto_increment,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=104 ; $dateP=date("Y-m-d");
$req_p="update personne set paiement=1
where id=".$CANDid." and date_paiement=\"".$dateP."\"
and id_produit=".$PRODid." ";
Mon probleme c'est qu'il met à jour tous les lignes avec id_produit=".$PRODid." meme si la date paiement est différent de $datePmerci pour votre conseil