[QUOTE=RHS;16464]Probably not …
This code don’t works in my blank application (it’s works with mysql):
sc_lookup(infos_periode, "SELECT DATE_FORMAT(Min(TB_forfaits_tarification_modules
.date_debut
),’%d/%m/%Y’) AS date_debut
, DATE_FORMAT(Max(TB_forfaits_tarification_modules
.date_fin
),’%d/%m/%Y’) AS date_fin
FROM (((TB_inscriptions_classe
INNER JOIN TB_inscriptions_eleve
ON TB_inscriptions_classe
.num_inscription_eleve
= TB_inscriptions_eleve
.num_inscription_eleve
) INNER JOIN TB_inscription_eleve_modules
ON TB_inscriptions_eleve
.num_inscription_eleve
= TB_inscription_eleve_modules
.num_inscription_eleve
) INNER JOIN TB_inscription_eleve_forfaits
ON TB_inscriptions_eleve
.num_inscription_eleve
= TB_inscription_eleve_forfaits
.num_inscription_eleve
) INNER JOIN TB_forfaits_tarification_modules
ON (TB_inscription_eleve_modules
.num_module_formation
= TB_forfaits_tarification_modules
.num_module_formation
) AND (TB_inscription_eleve_forfaits
.num_forfait_tarification
= TB_forfaits_tarification_modules
.num_forfait_tarification
)
WHERE (((TB_inscriptions_classe
.num_classe
)=$num_classe) AND ((TB_inscriptions_eleve
.num_eleve
)=$num_eleve) AND ((TB_inscriptions_eleve
.num_inscription_eleve
)=$num_inscription_eleve))
");
But this one yes:
$sql_format_date = “’%d/%m/%Y’”;
sc_lookup(infos_periode, "SELECT DATE_FORMAT(Min(TB_forfaits_tarification_modules
.date_debut
),$sql_format_date) AS date_debut
, DATE_FORMAT(Max(TB_forfaits_tarification_modules
.date_fin
),’%d/%m/%Y’) AS date_fin
FROM (((TB_inscriptions_classe
INNER JOIN TB_inscriptions_eleve
ON TB_inscriptions_classe
.num_inscription_eleve
= TB_inscriptions_eleve
.num_inscription_eleve
) INNER JOIN TB_inscription_eleve_modules
ON TB_inscriptions_eleve
.num_inscription_eleve
= TB_inscription_eleve_modules
.num_inscription_eleve
) INNER JOIN TB_inscription_eleve_forfaits
ON TB_inscriptions_eleve
.num_inscription_eleve
= TB_inscription_eleve_forfaits
.num_inscription_eleve
) INNER JOIN TB_forfaits_tarification_modules
ON (TB_inscription_eleve_modules
.num_module_formation
= TB_forfaits_tarification_modules
.num_module_formation
) AND (TB_inscription_eleve_forfaits
.num_forfait_tarification
= TB_forfaits_tarification_modules
.num_forfait_tarification
)
WHERE (((TB_inscriptions_classe
.num_classe
)=$num_classe) AND ((TB_inscriptions_eleve
.num_eleve
)=$num_eleve) AND ((TB_inscriptions_eleve
.num_inscription_eleve
)=$num_inscription_eleve))
");
so the problem is my first ‘%d/%m/%Y’ used in format_date definition, the second one with the same syntax works fine, no change necessary, that is strange.