Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $arr1=[];
- $sqlquery="Select codart,canped,codpro
- from gcpedl
- where gcpedl.numped in (
- select numped
- from gcpedc
- where texto like '".$_POST['codobra']."'
- )";
- $query_execute = mssql_query($sqlquery);
- while($query_result=mssql_fetch_array($query_execute)){
- $arr1=$query_result;
- $sqlq="Select distinct alart.codart,pultcomp,alart.codpro from alart,gcpedl where gcpedl.numped in (select numped from gcpedc where texto like '".$_POST['codobra']."') and alart.codart in (Select codart from gcpedl where numped in (select numped from gcpedc where texto like '".$_POST['codobra']."')) ";
- $sqlex =mssql_query($sqlq);
- while($sqlre=mssql_fetch_array($sqlex)){
- if ( trim(strtoUPPER($sqlre['codart'])," ")==trim(strtoUPPER($query_result['codart'])," ")
- and $sqlre['codpro']==$query_result['codpro'] )
- {
- if ( $arr1['codart'] != 'CUADRO'
- and $arr1['codart'] != 'cuadro'
- and $arr1['codart'] != 'instalacion'
- and $arr1['codart'] != 'INSTALACION')
- {
- $materiales= $materiales+ ($sqlre['pultcomp']*$arr1['canped']);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement