26-08-2007, 01:34 AM
je pense dire une connerie mais peut-être avec une concaténation...
UPDATE dj,clubs,soiree SET". IF CEIL(SQRT(dj.reputation_dj*clubs.reputation_club)/(soiree.prixentree_soiree/2)+0.3*clubs.capacite_club)>clubs.capacite_club." THEN soiree.nbpersonne_soiree=clubs.capacite_club". ELSE ."soiree.nbpersonne_soiree=CEIL(SQRT(dj.reputation_dj*clubs.reputation_club)/(soiree.prixentree_soiree/2)+0.3*clubs.capacite_club) WHERE soiree.id_dj=dj.id_dj AND soiree.id_club=clubs.id_club ANDsoiree.date_soiree='2007-08-24'
UPDATE dj,clubs,soiree SET". IF CEIL(SQRT(dj.reputation_dj*clubs.reputation_club)/(soiree.prixentree_soiree/2)+0.3*clubs.capacite_club)>clubs.capacite_club." THEN soiree.nbpersonne_soiree=clubs.capacite_club". ELSE ."soiree.nbpersonne_soiree=CEIL(SQRT(dj.reputation_dj*clubs.reputation_club)/(soiree.prixentree_soiree/2)+0.3*clubs.capacite_club) WHERE soiree.id_dj=dj.id_dj AND soiree.id_club=clubs.id_club ANDsoiree.date_soiree='2007-08-24'