Commit 248e8926446a7efcb43ce44a0c59b146996f7c95

Authored by Caroline Salib
1 parent 90519d64
Exists in master

Ajustado bug ao buscar CEP;

* Ajustado dados de conexão com o banco;
portabilis/ieducar#195
ieducar/configuration/ieducar.ini
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 ; Configurações de banco de dados 54 ; Configurações de banco de dados
55 app.database.dbname = ieducar 55 app.database.dbname = ieducar
56 app.database.username = postgres 56 app.database.username = postgres
57 -app.database.hostname = postgres95 57 +app.database.hostname = localhost
58 app.database.password = postgres 58 app.database.password = postgres
59 app.database.port = 5432 59 app.database.port = 5432
60 60
ieducar/intranet/educar_pesquisa_cep_log_bairro.php
@@ -165,13 +165,13 @@ class miolo1 extends clsListagem @@ -165,13 +165,13 @@ class miolo1 extends clsListagem
165 $paramCount = 1; 165 $paramCount = 1;
166 166
167 foreach ($params as $name => $value) { 167 foreach ($params as $name => $value) {
168 - $select .= " AND $name ILIKE '%'||\$$paramCount||'%'"; 168 + $select .= " AND $name::varchar ILIKE '%'||\$$paramCount||'%'";
169 $paramCount++; 169 $paramCount++;
170 } 170 }
171 171
172 $total = Portabilis_Utils_Database::selectField(' SELECT COUNT(0) '.$select, array('params' => array_values($params))); 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 $result = Portabilis_Utils_Database::fetchPreparedQuery($pre_select.$select, array('params' => array_values($params))); 176 $result = Portabilis_Utils_Database::fetchPreparedQuery($pre_select.$select, array('params' => array_values($params)));
177 177
@@ -10,5 +10,5 @@ environments: @@ -10,5 +10,5 @@ environments:
10 name: ieducar 10 name: ieducar
11 user: postgres 11 user: postgres
12 pass: postgres 12 pass: postgres
13 - port: 5430 13 + port: 5432
14 charset: utf8 14 charset: utf8