Maze Posted August 7, 2014 Author Share Posted August 7, 2014 (edited) hello Jaques1 - just again farom this lovley internet-cafe in southern-spain .,... thanks for clearing up. you set my thouthgs straingth - i want to gather data from openstreetmap.. Again many many thanks for this great asset of db-knowledge. < i think that i can go with the fixed solution - and this will fit all the needs. if there is no result - i.e. no value for a specific tag then there is null in DB.. that is no problem for me - so it goes well if i go with the data... many greetings guess that the main questions of this thread are answerd many many tahnks for all the help...!! matz some addtional notes: some examples.: btw: the key question is, how can we write the request: that takes up the adress-tags correctly: http://wiki.openstreetmap.org/wiki/Key:addr while trying to gather information about european schools - note i try it with different approaches with the target-goal to gather name adress long lat and town, street, housenumber information and then - if possible website -adress and if there are some more tags available then these too. so - as you Jaques1 mentioned - i go with the fixed db sheme and will catch as much as i can. in oother words - i will create a table with maxiumum of the tag/value combinations - in order to catch all .... spain: 10000 Records wget http://download.geofabrik.de/europe/spain-latest.osm.pbf ./osmconvert spain-latest.osm.pbf -o=spain.o5m ./osmfilter spain.o5m --keep="amenity=school" -o=spain-schools.o5m ./osmconvert spain-schools.o5m --all-to-nodes -o=spain-schools_nodes.o5m ./osmfilter spain-schools_nodes.o5m --keep="amenity=school" -o=spain-schools-results.o5m ./osmconvert spain-schools-results.o5m --csv="name addr:city website" -o=spain-schools-results.csv many many greetings for all matzh Edited August 7, 2014 by Maze Quote Link to comment https://forums.phpfreaks.com/topic/290303-creating-tables-in-php-leads-to-errors-in-phpmyadmin/page/2/#findComment-1487082 Share on other sites More sharing options...
jazzman1 Posted August 7, 2014 Share Posted August 7, 2014 Barand is already gave you a solution here. Gizmola is wrong b/s your structure is the same as Jacques1 stated above. Quote Link to comment https://forums.phpfreaks.com/topic/290303-creating-tables-in-php-leads-to-errors-in-phpmyadmin/page/2/#findComment-1487083 Share on other sites More sharing options...
Maze Posted August 7, 2014 Author Share Posted August 7, 2014 hello jazzmann hello jaques1 hello all many thanks @ jazzmann for the hint - yes youre right - this hint was given by barand he said: Instead of hard-coding the required column names as in $fields = array('id','lat','lon','name','amenity','operator','vending'); and continued ..... you could use this to pick up any additional columns added to your pois table $sql = "SHOW COLUMNS FROM pois"; $fields = array(); $res = $db->query($sql); while ($row = $res->fetch_row()) { $fields[] = $row[0]; } i think that this does the trick.. gizmola - gae osome hints and ideas regarding mongodb: well i do not know mongodb but i guess that barands hints were solving the issues. many many thanks for all your contineued help and your supportive way of inspiring me. this forum is great - and you helped me quite alot!!! greetings matz Quote Link to comment https://forums.phpfreaks.com/topic/290303-creating-tables-in-php-leads-to-errors-in-phpmyadmin/page/2/#findComment-1487141 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.