- $sSQL = 'select place_id from placex where';
- $sSQL .= ' osm_type = '.getDBQuoted($sOsmType);
- $sSQL .= ' and osm_id = '.$sOsmId;
- $sParentId = $oDB->getOne($sSQL);
- if (PEAR::isError($sParentId)) fail(pg_last_error($oDB->connection));
+ $sSQL = 'select place_id from placex where osm_type = :osm_type and osm_id = :osm_id';
+ $sParentId = $oDB->getOne($sSQL, array('osm_type' => $sOsmType, 'osm_id' => $sOsmId));