diff --git a/html/poste_search.php b/html/poste_search.php index 90556cf19..3adc562b8 100644 --- a/html/poste_search.php +++ b/html/poste_search.php @@ -32,11 +32,10 @@ if ( ! isset ( $g_dossier ) ) { exit -2; } -$opt=' <='; -$opt.=' <'; -$opt.=' ='; -$opt.=' >'; -$opt.=' >='; +// $opt=' commence par'; +// $opt.=' >'; +// $opt.=' >='; + $c_comment=""; $c_class=""; @@ -54,13 +53,14 @@ if ( isset($_POST['search']) ) { } if ( strlen(trim($p_class)) != 0 && (string) $p_class == (int)(string) $p_class) { - if ($c1==1) { - $c_class=sprintf(" and pcm_val %s %s",$p_class_sel,$p_class); - } else { - $c_class=sprintf(" where pcm_val %s %s",$p_class_sel,$p_class); - $c1=1; + if ($c1==1) + $clause=" and "; + else + $clause = " where "; + $c_class=sprintf(" %s pcm_val::text like '%s%%'",$clause,$p_class); + } - } + $condition=$c_comment.$c_class; } @@ -69,9 +69,10 @@ echo ''; echo ''; echo ''; -echo ' Class '; -echo ' '.$opt.' '; +echo 'Poste Comptable Commence par '; + if ( ! isset ($p_class) ) $p_class=""; +$opt=" "; echo ' '; echo ' Libellé ';