<?php

	require("§lib_inc.php");

	set_time_limit(0);
	
	flush();

	$sql_query= "	update oxg_flashlist set date_min= ";
	$sql_query.="	(select min_date from ";
	$sql_query.="	(select evt_lieu.id_family, evt_lieu.id_country, evt_lieu.id_zone, evt_lieu.id_city, oxg_patronyms.libelle, min(evt_lieu.devnt) min_date ";
	$sql_query.="	from oxg_events2 evt_lieu ";
	$sql_query.="			, oxg_individuals ";
	$sql_query.="			, oxg_patronyms ";
	$sql_query.="	where evt_lieu.id_family=oxg_individuals.id_family ";
	$sql_query.="	and oxg_individuals.id_individual=evt_lieu.id_individu ";
	$sql_query.="	and oxg_individuals.id_patronym=oxg_patronyms.id_patronym ";
	$sql_query.="	and evt_lieu.id_city<>-1 ";
	$sql_query.="	group by evt_lieu.id_family, evt_lieu.id_city, evt_lieu.id_zone, evt_lieu.id_city, oxg_patronyms.libelle) evt_min_date ";
	$sql_query.="	where evt_min_date.id_country=oxg_flashlist.country ";
	$sql_query.="	and evt_min_date.id_zone=oxg_flashlist.zone ";
	$sql_query.="	and evt_min_date.id_city=oxg_flashlist.city ";
	$sql_query.="	and evt_min_date.libelle=oxg_flashlist.name ";
	$sql_query.="	and min_date is not null ";
	$sql_query.="	and evt_min_date.id_family=oxg_flashlist.id_family) ";
	mysql_query($sql_query) or mysql_die();

	echo "dates minimums chargées";

?>

<P>Table oxg_flashlist effectué
	<SCRIPT LANGUAGE="JavaScript">
	<!--
	setTimeout("top.location.href = '§flash1.php?CREAT=AUTO'",1);
	//-->
	</SCRIPT>
</body></html>