Commit 1cd0d50cb2bcbcb08e9df43c464b7c0ce5cb56ba
1 parent
1b07840e
Exists in
master
and in
7 other branches
Correção na seleção por atributos numéricos
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
classesphp/classe_selecao.php
... | ... | @@ -337,7 +337,12 @@ $valor - Valor. |
337 | 337 | if($this->layer->connectiontype == MS_POSTGIS) |
338 | 338 | {$this->layer->querybyattributes($item,$item." ".$operador." '".$valor."' ",1);} |
339 | 339 | else |
340 | - {$this->layer->querybyattributes($item,'("['.$item.']"'.$operador.'"'.$valor.'")',1);} | |
340 | + { | |
341 | + if(!is_numeric($valor)) | |
342 | + {$this->layer->querybyattributes($item,'("['.$item.']"'.$operador.'"'.$valor.'")',1);} | |
343 | + else | |
344 | + {$this->layer->querybyattributes($item,'(['.$item.']'.$operador.' '.$valor.' )',1);} | |
345 | + } | |
341 | 346 | $res_count = $this->layer->getNumresults(); |
342 | 347 | $shpi = array(); |
343 | 348 | for ($i = 0; $i < $res_count; ++$i) | ... | ... |