Commit 90519d645394b4ce86aa5784b1e4c2e330b59c34
1 parent
ce46c6e4
Exists in
master
Corrigido bug ao converter para ascii na busca de alunos;
portabilis/ieducar#194
Showing
1 changed file
with
14 additions
and
14 deletions
Show diff stats
ieducar/intranet/include/pmieducar/clsPmieducarAluno.inc.php
@@ -542,7 +542,7 @@ class clsPmieducarAluno | @@ -542,7 +542,7 @@ class clsPmieducarAluno | ||
542 | cadastro.pessoa | 542 | cadastro.pessoa |
543 | WHERE | 543 | WHERE |
544 | cadastro.pessoa.idpes = ref_idpes | 544 | cadastro.pessoa.idpes = ref_idpes |
545 | - AND TO_ASCII(LOWER(nome)) LIKE TO_ASCII(LOWER('%{$str_nome_aluno}%')) | 545 | + AND LOWER(nome) LIKE LOWER('%{$str_nome_aluno}%') |
546 | )"; | 546 | )"; |
547 | 547 | ||
548 | $whereAnd = ' AND '; | 548 | $whereAnd = ' AND '; |
@@ -552,14 +552,14 @@ class clsPmieducarAluno | @@ -552,14 +552,14 @@ class clsPmieducarAluno | ||
552 | $and_resp = ''; | 552 | $and_resp = ''; |
553 | 553 | ||
554 | if (is_string($str_nome_responsavel)) { | 554 | if (is_string($str_nome_responsavel)) { |
555 | - $and_nome_pai_mae = "OR UPPER(TO_ASCII(aluno.nm_pai)) LIKE UPPER(TO_ASCII('%$str_nome_responsavel%')) AND (aluno.tipo_responsavel = 'p')"; | 555 | + $and_nome_pai_mae = "OR UPPER((aluno.nm_pai)) LIKE UPPER(('%$str_nome_responsavel%')) AND (aluno.tipo_responsavel = 'p')"; |
556 | 556 | ||
557 | - $and_nome_pai_mae .= "OR UPPER(TO_ASCII(aluno.nm_mae)) LIKE UPPER(TO_ASCII('%$str_nome_responsavel%')) AND (aluno.tipo_responsavel = 'm')"; | 557 | + $and_nome_pai_mae .= "OR UPPER((aluno.nm_mae)) LIKE UPPER(('%$str_nome_responsavel%')) AND (aluno.tipo_responsavel = 'm')"; |
558 | 558 | ||
559 | $and_nome_resp = " | 559 | $and_nome_resp = " |
560 | - (UPPER(TO_ASCII(pai_mae.nome)) LIKE UPPER(TO_ASCII('%$str_nome_responsavel%'))) AND (aluno.tipo_responsavel = 'm') AND pai_mae.idpes = fisica_aluno.idpes_mae | 560 | + (UPPER((pai_mae.nome)) LIKE UPPER(('%$str_nome_responsavel%'))) AND (aluno.tipo_responsavel = 'm') AND pai_mae.idpes = fisica_aluno.idpes_mae |
561 | OR | 561 | OR |
562 | - (UPPER(TO_ASCII(pai_mae.nome)) LIKE UPPER(TO_ASCII('%$str_nome_responsavel%'))) AND (aluno.tipo_responsavel = 'p') AND pai_mae.idpes = fisica_aluno.idpes_pai"; | 562 | + (UPPER((pai_mae.nome)) LIKE UPPER(('%$str_nome_responsavel%'))) AND (aluno.tipo_responsavel = 'p') AND pai_mae.idpes = fisica_aluno.idpes_pai"; |
563 | 563 | ||
564 | $and_resp = ' AND '; | 564 | $and_resp = ' AND '; |
565 | } | 565 | } |
@@ -610,12 +610,12 @@ class clsPmieducarAluno | @@ -610,12 +610,12 @@ class clsPmieducarAluno | ||
610 | } | 610 | } |
611 | 611 | ||
612 | if (is_string($str_nm_pai)) { | 612 | if (is_string($str_nm_pai)) { |
613 | - $filtros .= "{$whereAnd} TO_ASCII(LOWER(nm_pai)) nm_pai LIKE TO_ASCII(LOWER('%{$str_nm_pai}%'))"; | 613 | + $filtros .= "{$whereAnd} (LOWER(nm_pai)) nm_pai LIKE (LOWER('%{$str_nm_pai}%'))"; |
614 | $whereAnd = ' AND '; | 614 | $whereAnd = ' AND '; |
615 | } | 615 | } |
616 | 616 | ||
617 | if (is_string($str_nm_mae)) { | 617 | if (is_string($str_nm_mae)) { |
618 | - $filtros .= "{$whereAnd} TO_ASCII(LOWER(nm_mae)) LIKE TO_ASCII(LOWER('%{$str_nm_mae}%'))"; | 618 | + $filtros .= "{$whereAnd} (LOWER(nm_mae)) LIKE (LOWER('%{$str_nm_mae}%'))"; |
619 | $whereAnd = ' AND '; | 619 | $whereAnd = ' AND '; |
620 | } | 620 | } |
621 | 621 | ||
@@ -768,7 +768,7 @@ class clsPmieducarAluno | @@ -768,7 +768,7 @@ class clsPmieducarAluno | ||
768 | cadastro.pessoa | 768 | cadastro.pessoa |
769 | WHERE | 769 | WHERE |
770 | cadastro.pessoa.idpes = ref_idpes | 770 | cadastro.pessoa.idpes = ref_idpes |
771 | - AND TO_ASCII(LOWER(nome)) LIKE TO_ASCII(LOWER('%{$str_nome_aluno}%')) | 771 | + AND (LOWER(nome)) LIKE (LOWER('%{$str_nome_aluno}%')) |
772 | )"; | 772 | )"; |
773 | 773 | ||
774 | $whereAnd = ' AND '; | 774 | $whereAnd = ' AND '; |
@@ -778,14 +778,14 @@ class clsPmieducarAluno | @@ -778,14 +778,14 @@ class clsPmieducarAluno | ||
778 | $and_resp = ''; | 778 | $and_resp = ''; |
779 | 779 | ||
780 | if (is_string($str_nome_responsavel)) { | 780 | if (is_string($str_nome_responsavel)) { |
781 | - $and_nome_pai_mae = "OR UPPER(TO_ASCII(aluno.nm_pai)) LIKE UPPER(TO_ASCII('%$str_nome_responsavel%')) AND (aluno.tipo_responsavel = 'p')"; | 781 | + $and_nome_pai_mae = "OR UPPER((aluno.nm_pai)) LIKE UPPER(('%$str_nome_responsavel%')) AND (aluno.tipo_responsavel = 'p')"; |
782 | 782 | ||
783 | - $and_nome_pai_mae .= "OR UPPER(TO_ASCII(aluno.nm_mae)) LIKE UPPER(TO_ASCII('%$str_nome_responsavel%')) AND (aluno.tipo_responsavel = 'm')"; | 783 | + $and_nome_pai_mae .= "OR UPPER((aluno.nm_mae)) LIKE UPPER(('%$str_nome_responsavel%')) AND (aluno.tipo_responsavel = 'm')"; |
784 | 784 | ||
785 | $and_nome_resp = " | 785 | $and_nome_resp = " |
786 | - (UPPER(TO_ASCII(pai_mae.nome)) LIKE UPPER(TO_ASCII('%$str_nome_responsavel%'))) AND (aluno.tipo_responsavel = 'm') AND pai_mae.idpes = fisica_aluno.idpes_mae | 786 | + (UPPER((pai_mae.nome)) LIKE UPPER(('%$str_nome_responsavel%'))) AND (aluno.tipo_responsavel = 'm') AND pai_mae.idpes = fisica_aluno.idpes_mae |
787 | OR | 787 | OR |
788 | - (UPPER(TO_ASCII(pai_mae.nome)) LIKE UPPER(TO_ASCII('%$str_nome_responsavel%'))) AND (aluno.tipo_responsavel = 'p') AND pai_mae.idpes = fisica_aluno.idpes_pai"; | 788 | + (UPPER((pai_mae.nome)) LIKE UPPER(('%$str_nome_responsavel%'))) AND (aluno.tipo_responsavel = 'p') AND pai_mae.idpes = fisica_aluno.idpes_pai"; |
789 | 789 | ||
790 | $and_resp = 'AND'; | 790 | $and_resp = 'AND'; |
791 | } | 791 | } |
@@ -835,12 +835,12 @@ class clsPmieducarAluno | @@ -835,12 +835,12 @@ class clsPmieducarAluno | ||
835 | } | 835 | } |
836 | 836 | ||
837 | if (is_string($str_nm_pai)) { | 837 | if (is_string($str_nm_pai)) { |
838 | - $filtros .= "{$whereAnd} TO_ASCII(LOWER(nm_pai)) nm_pai LIKE TO_ASCII(LOWER('%{$str_nm_pai}%'))"; | 838 | + $filtros .= "{$whereAnd} (LOWER(nm_pai)) nm_pai LIKE (LOWER('%{$str_nm_pai}%'))"; |
839 | $whereAnd = ' AND '; | 839 | $whereAnd = ' AND '; |
840 | } | 840 | } |
841 | 841 | ||
842 | if (is_string($str_nm_mae)) { | 842 | if (is_string($str_nm_mae)) { |
843 | - $filtros .= "{$whereAnd} TO_ASCII(LOWER(nm_mae)) LIKE TO_ASCII(LOWER('%{$str_nm_mae}%'))"; | 843 | + $filtros .= "{$whereAnd} (LOWER(nm_mae)) LIKE (LOWER('%{$str_nm_mae}%'))"; |
844 | $whereAnd = ' AND '; | 844 | $whereAnd = ' AND '; |
845 | } | 845 | } |
846 | 846 |