SELECT p.codePrestataire,p.libelle,l.libelle,p.telephoneFixe,p.telephonePortable,p.longitude,p.latitude,actif
,p.adresseGeo,p.`nomResponsable`
FROM prestataire p
INNER JOIN localite l ON (l.codeLocalite=p.codeLocalite)
-- where latitude=(NULL)
WHERE p.libelle LIKE "%CDR%" 
-- AND p.codeTypePrestataire='PHA'
-- AND latitude IS NULL   
-- AND p.codePrestataire IN (SELECT codePrestataire FROM detailreseausoins)
-- AND p.codeTypePrestataire='PHA' 
AND p.codePays="CI" -- and latitude=(NULL)  --  AND p.conventionne=1



 AND l.codeVille="06"  -- abidjan


AND p.libelle LIKE "%MAROC%"

-- a verifier
SELECT * FROM `p_prestationactes` WHERE codePrestataire IN ("PR0239")


SELECT * FROM `prestataire` WHERE codePrestataire IN ("PR0239")



SELECT * FROM localite WHERE codePays="CI" AND libelle LIKE "%YOPO%"


SELECT EXTRACT(WEEK FROM CURRENT_DATE)+1, EXTRACT(YEAR FROM CURRENT_DATE),WEEK(NOW())+1
,EXTRACT(WEEK FROM CURRENT_DATE)>=WEEK(NOW()+1)  AS test


SELECT EXTRACT(WEEK FROM LEFT(NOW(),10))

INSERT INTO prestatairepaie(codePrestataire,dateDebut,dateFin,chequeDisponible,est_garde,codeUtilisateur,dateCreation,convention,nbre_semaine,annee)
VALUES ("PR0275","2022-06-25","2022-07-01","0","1","lionel",CURRENT_DATE,"1",EXTRACT(WEEK FROM CURRENT_DATE),EXTRACT(YEAR FROM CURRENT_DATE)) ;

SELECT DISTINCT codeUtilisateur FROM prestatairepaie WHERE nbre_semaine=33



SELECT 
-- EXTRACT(WEEK FROM CURRENT_DATE),WEEK(NOW())
-- WEEK(NOW())
* 
FROM prestatairepaie 
WHERE 
nbre_semaine=33
-- EXTRACT(WEEK FROM CURRENT_DATE)>=WEEK(NOW()) --  AND EXTRACT(WEEK FROM CURRENT_DATE)<=WEEK(NOW()+1) 


UPDATE prestatairepaie SET nbre_semaine=24 WHERE nbre_semaine=25





UPDATE prestataire SET latitude= REPLACE('5.394370',',','.'), longitude=REPLACE('-3.894017',',','.')  WHERE codePrestataire="PR1499";


UPDATE prestataire SET latitude= REPLACE('5,3773469',',','.'), longitude=REPLACE('-3,9948761',',','.')  WHERE codePrestataire="PR0447";
UPDATE prestataire SET latitude= REPLACE('5,317661',',','.'), longitude=REPLACE('-4,0166372',',','.')  WHERE codePrestataire="PR0590";
UPDATE prestataire SET latitude= REPLACE('5,3265673',',','.'), longitude=REPLACE('-4,0793824',',','.')  WHERE codePrestataire="PR0657";
UPDATE prestataire SET latitude= REPLACE('5,3011146',',','.'), longitude=REPLACE('-4,013906',',','.')  WHERE codePrestataire="PR0620";
UPDATE prestataire SET latitude= REPLACE('5,3003051',',','.'), longitude=REPLACE('-4,0050628',',','.')  WHERE codePrestataire="PR0621";
UPDATE prestataire SET latitude= REPLACE('5,2569535',',','.'), longitude=REPLACE('-3,9635003',',','.')  WHERE codePrestataire="PR0600";
UPDATE prestataire SET latitude= REPLACE('5,3369414',',','.'), longitude=REPLACE('-4,0023165',',','.')  WHERE codePrestataire="PR0326";
UPDATE prestataire SET latitude= REPLACE('5,3419152',',','.'), longitude=REPLACE('-4,0251482',',','.')  WHERE codePrestataire="PR0286";
UPDATE prestataire SET latitude= REPLACE('5,4269452',',','.'), longitude=REPLACE('-4,0220314',',','.')  WHERE codePrestataire="PR0233";
UPDATE prestataire SET latitude= REPLACE('5,3432745',',','.'), longitude=REPLACE('-4,0062386',',','.')  WHERE codePrestataire="PR0327";
UPDATE prestataire SET latitude= REPLACE('5,3234983',',','.'), longitude=REPLACE('-4,0199207',',','.')  WHERE codePrestataire="PR0566";
UPDATE prestataire SET latitude= REPLACE('5,3555108',',','.'), longitude=REPLACE('-3,9696059',',','.')  WHERE codePrestataire="PR0328";
UPDATE prestataire SET latitude= REPLACE('5,3180343',',','.'), longitude=REPLACE('-4,0192917',',','.')  WHERE codePrestataire="PR0567";
UPDATE prestataire SET latitude= REPLACE('5,34442',',','.'), longitude=REPLACE('-4,0134412',',','.')  WHERE codePrestataire="PR0329";
UPDATE prestataire SET latitude= REPLACE('5,2981993',',','.'), longitude=REPLACE('-4,0104437',',','.')  WHERE codePrestataire="PR0622";
UPDATE prestataire SET latitude= REPLACE('5,328118',',','.'), longitude=REPLACE('-4,0656623',',','.')  WHERE codePrestataire="PR0658";
UPDATE prestataire SET latitude= REPLACE('5,3475146',',','.'), longitude=REPLACE('-4,0278043',',','.')  WHERE codePrestataire="PR0287";
UPDATE prestataire SET latitude= REPLACE('5,3036765',',','.'), longitude=REPLACE('-3,967565',',','.')  WHERE codePrestataire="PR0471";
UPDATE prestataire SET latitude= REPLACE('5,3165208',',','.'), longitude=REPLACE('-4,0119138',',','.')  WHERE codePrestataire="PR0568";
UPDATE prestataire SET latitude= REPLACE('5,3531383',',','.'), longitude=REPLACE('-3,9790364',',','.')  WHERE codePrestataire="PR0330";
UPDATE prestataire SET latitude= REPLACE('5,3990304',',','.'), longitude=REPLACE('-3,9934874',',','.')  WHERE codePrestataire="PR0331";
UPDATE prestataire SET latitude= REPLACE('5,3156895',',','.'), longitude=REPLACE('-4,0195028',',','.')  WHERE codePrestataire="PR0569";
UPDATE prestataire SET latitude= REPLACE('5,3065783',',','.'), longitude=REPLACE('-4,0233517',',','.')  WHERE codePrestataire="PR0623";




