A page A tracking information button to open another page B through Windows.open, you need to pass the page A on the same line of conditions to query the results displayed on the B, the value is through a post or get can be removed from the a page value
Reply to discussion (solution)
A page Order Enquiry
if ($_post[' 1shijian1 ')
{
Echo ' <title>Data query</title>';
echo "";
if ($_post[' 1shijian1 ']<>null)
$shijian 1= "and COPTC. tc003>= ". $_post[' 1shijian1 ');
Else
$shijian 1 = "";
if ($_post[' 1shijian2 ']<>null)
$shijian 2= "and COPTC. tc003<= ". $_post[' 1shijian2 ');
Else
$shijian 2 = "";
Require_once (' i_code/connect.php ');
$query = "Select Leixing,null as xifen,null as sewen,null as DDGM,BZTDB, null as Daba,sum (TD008) as Td008,sum (TA015) ta015,su M (Rkzs) rkzs,sum (D310) d310,sum (D305) d305,sum (D304) d304,sum (D3023) d3023,sum (TH008) th008,sum (TJ007) TJ007
From Chaxun
Left JOIN ddtjmx on ma003=leixing
Left joins COPTC on TC001=DDTJMX. TD001 and TC002=DDTJMX. TD002
where xifen= ' ". $shijian 1. $shijian 2." GROUP by Leixing,bztdb
UNION ALL
Select Leixing,xifen,null as sewen,null as ddgm,bztdb,null as Daba,sum (TD008) as Td008,sum (TA015) ta015,sum (Rkzs) Rkzs, SUM (D310) d310,sum (D305) d305,sum (D304) d304,sum (D3023) d3023,sum (TH008) th008,sum (TJ007) TJ007
From Chaxun
Left JOIN ddtjmx on ma003=leixing and Xifen=xifen
Left joins COPTC on TC001=DDTJMX. TD001 and TC002=DDTJMX. TD002
where xifen= ' 5050 '. $shijian 1. $shijian 2. " GROUP by Leixing,xifen,bztdb
UNION ALL
Select Leixing,xifen,sewen,ddgm,bztdb,daba,sum (TD008) as Td008,sum (TA015) ta015,sum (Rkzs) rkzs,sum (D310) d310,sum ( D305) d305,sum (D304) d304,sum (D3023) d3023,sum (TH008) th008,sum (TJ007) TJ007
From Chaxun
Left joins DDTJMX on Ma003=leixing and Xifen=xifen and SEWEN=DDTJMX. UDF10 and DDGM=DDGM and Daba=xinghao
Left joins COPTC on TC001=DDTJMX. TD001 and TC002=DDTJMX. TD002
Where xifen<> ' and xifen<> ' 5050 '. $shijian 1. $shijian 2. " GROUP by Leixing,xifen,sewen,ddgm,bztdb,daba ORDER by Xifen,sewen,daba ";
$result =mssql_query ($query);
$row _num=mssql_num_rows ($result);
if ($row _num>0)
{
echo "
"; echo "
product category | ;
Product Segmentation | ;
Color temperature | ;
order size | ;
standard ratio of single investment | ;
Target Shooting | ;
order quantity | ;
expected yield | ;
total number of storage | ;
standard warehousing | ;
quantity of goods sold | ; The
number of pin back | ;
tracking Information | ;
"; while ($row =mssql_fetch_assoc ($result)){Echo
"; Echo
". $row [' leixing ']." | "; Echo
". $row [' Xifen ']." | "; Echo
". $row [' Sewen ']." | "; Echo
". $row [' DDGM ']." | "; Echo
". $row [' Bztdb ']." | "; Echo
". $row [' Daba ']." | "; Echo
". Number_format ($row [' TD008 '],0)." | "; Echo
". Number_format ($row [' TA015 '],0)." | "; Echo
". Number_format ($row [' Rkzs '],0)." | "; Echo
". Number_format ($row [' D310 '],0)." | "; Echo
". Number_format ($row [' TH008 '],0)." | "; Echo
". Number_format ($row [' TJ007 '],0)." | "; Echo
Tracking information | "; Echo
\ n ";}Echo
";
Echo ';
}
Mssql_close ($conn);
}
?>
b page
if ($_get[' N1 ')
{
Echo ' <title>Tracking information</title>';
Require_once (' i_code/connect.php ');
$querydd = "Select DDGM1. Td001,ddgm1. Td002,ddgm1. Td003,coptd. Td004,coptd. Td005,coptd. Td016,ma003,ddgm1. Udf10,xinghao,xifen,ddgm,ddgm1. Td008,coptd. Udf03,mocta. Ta001,mocta. Ta002,ddzs. Ta015,mocta. Ta011,mocta. Udf06,tdb,
Case when DDGM1. Td008=0 then 0 when ddgm1.td008<>0 then convert (decimal (18,3), Ddzs. Ta015/ddgm1. TD008) END as Sjb,ddzs. rkzs,d310,
Case when DDGM1. Td008=0 then 0 when ddgm1.td008<>0 then convert (decimal (18,3), d310/ddgm1. TD008) END as dddcl,d305,d304,d3023,th008,tj007
From DDGM1
Left joins Ddzs on Ddzs. Td001=ddgm1. TD001 and Ddzs. Td002=ddgm1. TD002 and Ddzs. Td003=ddgm1. TD003
Left joins COPTC on COPTC. Tc001=ddgm1. TD001 and COPTC. Tc002=ddgm1. TD002
Left joins Mocta on Ta026=ddzs. TD001 and Ta027=ddzs. TD002 and Ta028=ddzs. TD003
Left joins COPTD on COPTD. Td001=ddgm1. TD001 and COPTD. Td002=ddgm1. TD002 and COPTD. Td003=ddgm1. TD003
where Xifen like ". $_get[' N1 ')." and Xinghao like ". $_get[' N2 ';
$RESULTDD =mssql_query ($querydd);
$row _numdd=mssql_num_rows ($RESULTDD);
if ($row _numdd>0)
{
echo "
"; echo "
order slip | number;
type | ;
Color temperature | ;
model number | ;
subdivision | ;
order size | ;
order quantity | ;
expected yield | ;
standard ratio of single investment | ; The
actual ratio of single-vote | ; The
total number of storage | ;
qualified goods storage | ;
order Fulfillment Rate | ;
non-standard warehousing | ;
fraction storage | ;
waste storage | ;
quantity of goods sold | ; The
number of pin back | ;
"; while ($rowdd =mssql_fetch_assoc ($RESULTDD)){Echo
"; Echo
". $rowdd [' TD001 ']." -". $rowdd [' TD002 ']." -". $rowdd [' TD003 ']." | "; Echo
". $rowdd [' MA003 ']." | "; Echo
". $rowdd [' UDF10 ']." | "; Echo
". $rowdd [' Xinghao ']." | "; Echo
". $rowdd [' Xifen ']." | "; Echo
". $rowdd [' DDGM ']." | "; Echo
". Number_format ($rowdd [' TD008 '],0)." | "; Echo
". Number_format ($rowdd [' TA015 '],0)." | "; Echo
". $rowdd [' TDB ']." | "; Echo
". $rowdd [' SJB ']." | "; Echo
". Number_format ($rowdd [' Rkzs '],0)." | "; Echo
". Number_format ($rowdd [' D310 '],0)." | "; Echo
". $rowdd [' DDDCL ']." | "; Echo
". Number_format ($rowdd [' D305 '],0)." | "; Echo
". Number_format ($rowdd [' D304 '],0)." | "; Echo
". Number_format ($rowdd [' D3023 '],0)." | "; Echo
". Number_format ($rowdd [' TH008 '],0)." | "; Echo
". Number_format ($rowdd [' TJ007 '],0)." | "; Echo
\ n ";}Echo
";
}
Mssql_close ($conn);
}
?>
Need is from the page a leixing xifen Sewen daba conditions to the B page as a query condition, how to do it