



-- ARCHIVAGE OU DESARCHIVAGES DES COLLEGES


SELECT c.garantieArchive,c.* FROM  college c WHERE c.idPolice=360  AND id=894



UPDATE  college SET garantieArchive=0   WHERE idPolice=360  AND id=894







SELECT * FROM beneficiaire
 WHERE idPolice=157
numeroAdherent="01570001"

SELECT * FROM `garantiecollege`
WHERE id=27931
numeroAdherent="01570001"

SELECT * FROM 
WHERE 
numeroAdherent="01570001"


SELECT * FROM police WHERE id=157


SELECT * FROM `garantieadherent` WHERE idpolice=157

SELECT * FROM garantiebeneficiaire WHERE idpolice=157






-- 3 000 000
SELECT * 
FROM  beneficiaireprime
WHERE idPolice=179 AND idCollege=260


SELECT * FROM police WHERE numeroPolice="21000109"


SELECT * FROM police WHERE libellePolice LIKE '%ENI%'


SELECT * FROM  college WHERE idPolice=360 AND  id=231

UPDATE  college SET garantieArchive=0,primeNette=0,primeFamille=0 ,primeNetteAdherent=349793 WHERE id=365

SELECT * 
FROM  avenant
WHERE id=179


SELECT DISTINCT primeArchive 
FROM  adherent
WHERE idPolice=179

-- ARCHIVAGE

SELECT h.* 
FROM harchivageadherent h
INNER JOIN adherent a ON (a.id=h.idAdherent)
WHERE idPolice=179


SELECT h.* 
FROM harchivagebeneficiaire h
INNER JOIN beneficiaire a ON (a.id=h.idBeneficiaire)
WHERE idPolice=179

SELECT * FROM college WHERE idPolice=238
-- DESARCHIVAGE
UPDATE  adherent
SET primeArchive=0
WHERE idPolice=238 AND idCollege=359;

UPDATE  beneficiaire
SET primeArchive=0
WHERE idPolice=238 AND idCollege=359;

UPDATE  college SET garantieArchive=0 WHERE idPolice=135 AND (id=321) 

A.idPolice=76 AND (A.idCollege=321) 