The array $buscaMov[9]
, contains the word "Internal", but the if
only returns me false, in this case it will always stop at else
. It should register in the table of purchases, but only register in sales.
if ($buscaMov[9] == "Interno"){
$movInterno = mysql_query("INSERT INTO compras(descComp,precoComp,dataComp,setorComp) "
. "VALUES ($buscaMov[1],$buscaMov[7],$buscaMov[2],$buscaMov[8])");
}else{
$movExterno = mysql_query("INSERT INTO vendas(setorVend,precoVend,formPagVend,dataVend,descVend)"
. " VALUES ('$buscaMov[8]','$buscaMov[7]','x-x-x','$buscaMov[2]','$buscaMov[1]')");
}