Commit 6d677a2110bba4988161880e4c7a210b06f8e90f

Authored by Caroline Salib
2 parents 220df76d 248e8926
Exists in master

Merge branch 'master' into 'master'

Corrigido bug ao buscar cep

Referente a issue #71

See merge request !47
ieducar/configuration/ieducar.ini
... ... @@ -54,7 +54,7 @@
54 54 ; Configurações de banco de dados
55 55 app.database.dbname = ieducar
56 56 app.database.username = postgres
57   -app.database.hostname = postgres95
  57 +app.database.hostname = localhost
58 58 app.database.password = postgres
59 59 app.database.port = 5432
60 60  
... ...
ieducar/intranet/educar_pesquisa_cep_log_bairro.php
... ... @@ -165,13 +165,13 @@ class miolo1 extends clsListagem
165 165 $paramCount = 1;
166 166  
167 167 foreach ($params as $name => $value) {
168   - $select .= " AND $name ILIKE '%'||\$$paramCount||'%'";
  168 + $select .= " AND $name::varchar ILIKE '%'||\$$paramCount||'%'";
169 169 $paramCount++;
170 170 }
171 171  
172 172 $total = Portabilis_Utils_Database::selectField(' SELECT COUNT(0) '.$select, array('params' => array_values($params)));
173 173  
174   - $select .= sprintf(' LIMIT %s OFFSET %s', $limite, $iniciolimit);
  174 + $select .= sprintf(' LIMIT %s OFFSET %s', $limite, $iniciolimit);
175 175  
176 176 $result = Portabilis_Utils_Database::fetchPreparedQuery($pre_select.$select, array('params' => array_values($params)));
177 177  
... ...
phinx.yml
... ... @@ -10,5 +10,5 @@ environments:
10 10 name: ieducar
11 11 user: postgres
12 12 pass: postgres
13   - port: 5430
  13 + port: 5432
14 14 charset: utf8
... ...