My web application should access two different banks on different servers, put the column of the two banks on the screen and compare the result between them.
However, it only returns the value of one of the banks and the other it returns all zero, according to the image.
while($line=mysql_fetch_array($table_primal1)&&$lineup=mysql_fetch_array($table_primal2)){$convert2=(float)$line['campo016'];$convertup=(float)$lineup['campo016'];if($convertup==$convert2){$compara='Correto';$printtr='trcorrect';$printtd='correct';}else{$compara='Erro';$printtr='trerror';$printtd='error';}echo'<trclass='.$printtr.'>';echo'<tdclass='.$printtd.'>'.$line['papel'].'</td>';echo'<tdclass='.$printtd.'>'.$line['campo036'].'</td>';echo'<tdclass='.$printtd.'>'.$convert2.'</td>';echo'<tdclass='.$printtd.'>'.$convertup.'</td>';echo'<tdclass='.$printtd.'>'.$compara.'</td>';echo'</tr>';
Thecodeyoushoulddoallthisisbasicallythis.Itriedputtingonewhileinsideanother,butitonlyreturnsmethefirstresultoftheothercolumnanddpsrepeats.
FollowmyQuerys:
$table_primal1=mysql_query("SELECT * FROM quotes where origem='30' and papel like 'ZS_8' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZC_8' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZL_8' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZS_7' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZC_7' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZL_7' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZS_9' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZC_9' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZL_9' AND campo012 >= '0' AND campo016 >='0' ORDER BY papel ASC",$conexao_ori30a);
$table_primal2 = mysql_query("SELECT * FROM quotes where origem='30' and papel like 'ZS_8' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZC_8' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZL_8' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZS_7' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZC_7' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZL_7' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZS_9' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZC_9' AND campo012 >= '0' AND campo016 >='0' or origem='30' and papel like 'ZL_9' AND campo012 >= '0' AND campo016 >='0' ORDER BY papel ASC", $conexao_ori30b);