Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QueryByAttribute not handling some query cases for Oracle #5229

Closed
msmitherdc opened this issue Jan 30, 2016 · 1 comment
Closed

QueryByAttribute not handling some query cases for Oracle #5229

msmitherdc opened this issue Jan 30, 2016 · 1 comment

Comments

@msmitherdc
Copy link
Contributor

@msmitherdc msmitherdc commented Jan 30, 2016

Layer definition:

  LAYER
    NAME           "AVD"
    GROUP          "AVD"
    CONNECTIONTYPE postgis
    CONNECTION     "host=localhost port=5432 dbname=fwt_prod user=c2 password=C2"
    STATUS         ON
    TYPE           POLYGON
    MINSCALEDENOM  1500
    MAXSCALEDENOM  500000
    LABELMAXSCALEDENOM  21000
    POSTLABELCACHE FALSE
    PROCESSING "LABEL_NO_CLIP=ON"
    LABELCACHE ON
    TEMPLATE   "void"
#    DEBUG 5
    PROJECTION
      "init=epsg:3006"
    END

php

$oLayer= $oMap->getLayerByName("AVD");
if ($bDebug) {
  fwrite($f,"Layername: ".$oLayer->name."\r\n");
}

$data = "KARTOBJ_SDO FROM ".$dbowner.".AVD*AVD";
$data = str_replace("*","$",$data);
$ab = $oLayer->set("data", $data);
$filter = "([ORGID]='".$orgid."' AND [FV]='".$fv."' AND [BEV]='".$bev."' AND [SKIFTE]='".$skifte."')";
$aa = $oLayer->setFilter($filter);

$ac = $oLayer->setConnectionType(MS_ORACLESPATIAL);
$oLayer->set("connection", $conn);
$res = $oLayer->queryByAttributes("AVD", "'".$avd."'", MS_SINGLE);
if ($bDebug) {
  fwrite($f,"avd-res: ".$res."\r\n");
}
$oLayer->open();

results in:
wnum, KARTOBJ_SDO FROM c2.AVD$AVD WHERE AVD = AVD = '250' AND ORGID = 'BSD' AND FV = 'FV1' AND BEV = '1' AND SKIFTE = '3235'

@msmitherdc msmitherdc self-assigned this Jan 30, 2016
@msmitherdc msmitherdc added this to the 7.0.1 milestone Jan 30, 2016
tbonfort added a commit that referenced this issue Feb 25, 2016
Remove addition of filteritem to sql since its being added via the
filter translation processes
@tbonfort
Copy link
Member

@tbonfort tbonfort commented Feb 25, 2016

fixed in branch-7-0 in b1604a7

@tbonfort tbonfort closed this Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.