<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "As to make this consultation??"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "As to make this consultation??"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>As to make this consultation??</title>
				<description><![CDATA[ DIVISION OF FRANÇA ( LIMOUSIN )

- FRANÇA
-- 2998268 LIMOUSIN
--- 3023532 DEPARTMENT DE LA CORREZE
---- 2971297 ARRONDISSEMENT D'USSEL 
------ Canton de Bort-les-Orgues 
------- Bort-les-Orgues 
------- Margerides
------- Monestier-Port-Dieu 
------- Confolent-Port-Dieu 
------- Saint-Bonnet-près-Bort 
------- Saint-Julien-près-Bort 
------- Saint-Victour 
------- Sarroux 
------- Thalamy 
------- Veyrières 


I tried to make of the following form

----- CONTINENTE
$sql2 = "SELECT t1.* FROM geoname as t1 
    LEFT JOIN countryinfo as t2 ON ( t1.geonameid = t2.other2 )
    WHERE feature_class = 'A' AND feature_code = 'PCLI' AND t2.continent LIKE 'EU' ";

----- GET ADM1
$sql3 = "SELECT * FROM geoname WHERE feature_class LIKE 'A' AND feature_code LIKE 'ADM1' AND country_code LIKE '".$reg2['country_code']."' ";

----- GET ADM2
$sql4 = "SELECT t1.geonameid, t1.feature_code, t1.name, admin1_code, admin2_code FROM geoname as t1 LEFT JOIN admincodes2 as t2 ON (t1.geonameid = t2.geonameid) WHERE feature_class = 'A' AND feature_code = 'ADM2' AND t2.code LIKE '".$reg2['country_code'].".".$reg3['admin1_code']."%' AND admin1_code = '".$reg3['admin1_code']."' ";
            
---- GET ADM3
 $sql5 = "SELECT t1.geonameid, t1.feature_code, t1.name, t1.admin1_code, t1.admin2_code FROM geoname as t1 LEFT JOIN admincodes2 as t2 ON (t1.geonameid = t2.geonameid) WHERE feature_class = 'A' AND feature_code = 'ADM3' AND country_code = '".$reg2['country_code']."' AND admin1_code = '".$reg4['admin1_code']."' AND admin2_code = '".$reg4['admin2_code']."'  ";
                
----GET ADM4
$sql6 = "SELECT t1.geonameid, t1.feature_code, t1.name FROM geoname as t1 LEFT JOIN admincodes2 as t2 ON (t1.geonameid = t2.geonameid) WHERE feature_class = 'A' AND feature_code = 'ADM4' AND country_code = '".$reg2['country_code']."' AND admin1_code = '".$reg5['admin1_code']."' AND admin2_code = '".$reg5['admin2_code']."' LIMIT 100 ";
                        

my tree is this:

L 2998268 ADM1	Limousin
+ 3 divisoes 
L 3023532 ADM2	Département de la Corrèze
	+ 3 divisoes 
	L 2971297 ADM3	Arrondissement d'Ussel
	L 2971481 ADM3	Arrondissement de Tulle
	L 3029973 ADM3	Arrondissement de Brive-la-Gaillarde
L 3022516 ADM2	Département de la Creuse
+ 2 divisoes 
	L 3014382 ADM3	Arrondissement de Guéret
	L 3036293 ADM3	Arrondissement d'Aubusson
L 3013719 ADM2	Département de la Haute-Vienne
+ 3 divisoes 
	L 2983290 ADM3	Arrondissement de Rochechouart
	L 2998285 ADM3	Arrondissement de Limoges
	L 3033765 ADM3	Arrondissement de Bellac

my query 4 returns the equal data for each adm3
this is the correct form to mount all the structure?
as to make to only search adm4 of one specify adm3?

Thank's

Nei
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/513.page#2408</guid>
				<link>http://forum.geonames.org/gforum/posts/list/513.page#2408</link>
				<pubDate><![CDATA[Mon, 16 Jul 2007 17:42:56]]> GMT</pubDate>
				<author><![CDATA[ nrauni]]></author>
			</item>
			<item>
				<title>Re:As to make this consultation??</title>
				<description><![CDATA[ Hi Nei

We are still working on ADM3 and ADM4. In the dump only ADM1 and ADM2 are included. We will change the dump file format and add two new columns for admin3 code and admin4 code.

Cheers

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/513.page#2410</guid>
				<link>http://forum.geonames.org/gforum/posts/list/513.page#2410</link>
				<pubDate><![CDATA[Mon, 16 Jul 2007 20:30:36]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:As to make this consultation??</title>
				<description><![CDATA[ Hi Marc, Thanks a lot for the reply, you have some forecast of this correction? 

Nei]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/513.page#2412</guid>
				<link>http://forum.geonames.org/gforum/posts/list/513.page#2412</link>
				<pubDate><![CDATA[Mon, 16 Jul 2007 22:08:43]]> GMT</pubDate>
				<author><![CDATA[ nrauni]]></author>
			</item>
			<item>
				<title>Re:As to make this consultation??</title>
				<description><![CDATA[ Hi Nei

Next week Wednesday 25 of July (~1 h GMT) we will add two new columns "admin3"  and "admin4" to the daily dump files. The columns apply for France, Spain, Italy, Germany, Bulgaria, Switzerland, and Morocco. Other countries will follow.
You find the new columns below.

Cheers

Marc 

http://groups.google.com/group/geonames/browse_thread/thread/9cb993547deddfbd?hl=en]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/513.page#2457</guid>
				<link>http://forum.geonames.org/gforum/posts/list/513.page#2457</link>
				<pubDate><![CDATA[Fri, 20 Jul 2007 11:21:42]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:As to make this consultation??</title>
				<description><![CDATA[ Thank a lot]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/513.page#2460</guid>
				<link>http://forum.geonames.org/gforum/posts/list/513.page#2460</link>
				<pubDate><![CDATA[Fri, 20 Jul 2007 14:16:12]]> GMT</pubDate>
				<author><![CDATA[ nrauni]]></author>
			</item>
			<item>
				<title>Re:As to make this consultation??</title>
				<description><![CDATA[ no update?]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/513.page#2494</guid>
				<link>http://forum.geonames.org/gforum/posts/list/513.page#2494</link>
				<pubDate><![CDATA[Thu, 26 Jul 2007 03:27:53]]> GMT</pubDate>
				<author><![CDATA[ nrauni]]></author>
			</item>
	</channel>
</rss>