[Mapbender-commits] r8449 - trunk/mapbender/http/geoportal
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Aug 6 00:45:08 PDT 2012
Author: armin11
Date: 2012-08-06 00:45:08 -0700 (Mon, 06 Aug 2012)
New Revision: 8449
Modified:
trunk/mapbender/http/geoportal/gaz_geom_mobile.php
Log:
bugfix
Modified: trunk/mapbender/http/geoportal/gaz_geom_mobile.php
===================================================================
--- trunk/mapbender/http/geoportal/gaz_geom_mobile.php 2012-07-23 14:24:40 UTC (rev 8448)
+++ trunk/mapbender/http/geoportal/gaz_geom_mobile.php 2012-08-06 07:45:08 UTC (rev 8449)
@@ -84,6 +84,8 @@
$searchThruWeb = true;
}
+
+$e = new mb_exception("maxResults: ".$maxResults);
$con = pg_connect("host=".GEOMDB_HOST." port=".GEOMDB_PORT." dbname=".GEOMDB_NAME." user=".GEOMDB_USER." password=".GEOMDB_PASSWORD)
or die('Verbindungsaufbau fehlgeschlagen: ' . pg_last_error());
@@ -245,7 +247,8 @@
$sql = "SELECT DISTINCT * FROM (SELECT DISTINCT gem_schl_neu, gemeinde_neu AS gem FROM gemeinden ";
$sql .= "WHERE gemeinde_upper LIKE $1";
$sql .= "UNION SELECT DISTINCT gem_schl_neu, gemeinde_gem_teile AS gem FROM wohnplatz ";
- $sql .= "WHERE gemeinde_gem_teile_upper LIKE $2) AS str";
+ $sql .= "WHERE ewz_int IS NOT NULL AND gemeinde_gem_teile_upper LIKE $2";
+ $sql .= ") AS str";
$res = db_prep_query($sql,$v,$t);
while($row = db_fetch_array($res)){
array_push($ckeys, $row['gem_schl_neu']);
@@ -255,9 +258,10 @@
$v = array($b, $b);
$t = array('s', 's');
$sql = "SELECT DISTINCT * FROM (SELECT DISTINCT gem_schl_neu, gemeinde_neu AS gem FROM gemeinden ";
- $sql .= "WHERE gemeinde_upper LIKE $1";
+ $sql .= "WHERE gemeinde_upper LIKE $1 ";
$sql .= "UNION SELECT DISTINCT gem_schl_neu, gemeinde_gem_teile AS gem FROM wohnplatz ";
- $sql .= "WHERE gemeinde_gem_teile_upper LIKE $2) AS str";
+ $sql .= "WHERE ewz_int IS NOT NULL AND gemeinde_gem_teile_upper LIKE $2";
+ $sql .= ") AS str";
$res = db_prep_query($sql,$v,$t);
while($row = db_fetch_array($res)){
array_push($ckeys, $row['gem_schl_neu']);
@@ -333,9 +337,10 @@
$v = array($a, $a);
$t = array('s', 's');
$sql = "SELECT DISTINCT * FROM (SELECT DISTINCT gem_schl_neu, gemeinde_neu AS gem FROM gemeinden ";
- $sql .= "WHERE gemeinde_upper LIKE $1";
+ $sql .= "WHERE gemeinde_upper LIKE $1 ";
$sql .= "UNION SELECT DISTINCT gem_schl_neu, gemeinde_gem_teile AS gem FROM wohnplatz ";
- $sql .= "WHERE gemeinde_gem_teile_upper LIKE $2) AS str";
+ $sql .= "WHERE ewz_int IS NOT NULL AND gemeinde_gem_teile_upper LIKE $2";
+ $sql .=") AS str";
$res = db_prep_query($sql,$v,$t);
while($row = db_fetch_array($res)){
array_push($ckeys, $row['gem_schl_neu']);
More information about the Mapbender_commits
mailing list