In my code I do a search on BD
adding array
to the results found. And before the value I enter a letter to identify the results.
<?php
$w_select ="SELECT * FROM public.sai_cad_patr_seri WHERE
sai_cad_patr_seri.fk_seq_cara_peri = '$arr_w_param[17]'";
$w_querybusc = "$w_select;";
$w_queryresult=f_class_conecta_bd($w_querybusc);
$index = 0;
$patr = array();
$seri = array();
while($w_registro = pg_fetch_object($w_queryresult))
{
$patr[$index] = "P".trim($w_registro->tx_num_patr);
$seri[$index] = "S".trim($w_registro->tx_num_seri);
$index++;
}
?>
But I came across the following problem ... After I get these values I add them to a array JS
, but if array $patr
has only entered the letter 'strong' 'P' or vise-versa with $seri
and no value then it will take up space and will hinder any subsequent changes.
So I'd like to know if you have any unsaved position after 'P' or 'S' !
$patr = [P ];