ÊÃØ»ÂÍ´ÊÑ觨ͧàÊ×éÍÈÔÅ»Ëѵ¶¡ÃÃÁ¹Ñ¡àÃÕ¹ ¤ÃÑ駷Õè 67 »Õ 2560 ʾ».ÈÃÕÊÐà¡É ࢵ 1
THA; $sql1="select sum(jss) as xjss, sum(js) as xjs, sum(jm) as xjm, sum(jl) as xjl, sum(jxl) as xjxl, sum(j2xl) as xj2xl, sum(j3xl) as xj3xl, sum(p1ss) as xp1ss, sum(p1s) as xp1s, sum(p1m) as xp1m, sum(p1l) as xp1l, sum(p1xl) as xp1xl, sum(p12xl) as xp12xl, sum(p13xl) as xp13xl, sum(p14xl) as xp14xl, sum(p15xl) as xp15xl, sum(p2ss) as xp2ss, sum(p2s) as xp2s, sum(p2m) as xp2m, sum(p2l) as xp2l, sum(p2xl) as xp2xl, sum(p22xl) as xp22xl, sum(p23xl) as xp23xl, sum(p24xl) as xp24xl, sum(p25xl) as xp25xl from sk1_sch "; $result1=mysql_query($sql1); $db1=mysql_fetch_array($result1); $nss=$db1[xjss]+$db1[xp1ss]+$db1[xp2ss]; $ns=$db1[xjs]+$db1[xp1s]+$db1[xp2s]; $nm=$db1[xjm]+$db1[xp1m]+$db1[xp2m]; $nl=$db1[xjl]+$db1[xp1l]+$db1[xp2l]; $nxl=$db1[xjxl]+$db1[xp1xl]+$db1[xp2xl]; $n2xl=$db1[xj2xl]+$db1[xp12xl]+$db1[xp22xl]; $n3xl=$db1[xj3xl]+$db1[xp13xl]+$db1[xp23xl]; $n4xl=$db1[xp14xl]+$db1[xp24xl]; $n5xl=$db1[xp15xl]+$db1[xp25xl]; $nt=$nss+$ns+$nm+$nl+$nxl+$n2xl+$n3xl+$n4xl+$n5xl; $cj=$db1[xjss]+$db1[xjs]+$db1[xjm]+$db1[xjl]+$db1[xjxl]+$db1[xj2xl]+$db1[xj3xl]; $cp1=$db1[xp1ss]+$db1[xp1s]+$db1[xp1m]+$db1[xp1l]+$db1[xp1xl]+$db1[xp12xl]+$db1[xp13xl]+$db1[xp14xl]+$db1[xp15xl]; $cp2=$db1[xp2ss]+$db1[xp2s]+$db1[xp2m]+$db1[xp2l]+$db1[xp2xl]+$db1[xp22xl]+$db1[xp23xl]+$db1[xp24xl]+$db1[xp25xl]; $bj=number_format($cj*390); $bp1=number_format($cp1*250); $bp2=number_format($cp2*250); $bt=number_format(($cj*390)+($cp1*250)+($cp2*250)); echo <<
¢¹Ò´ Size á¨ç¡à¡çµ â»âÅ(ªÒÂ) â»âÅ(Ë­Ô§) ÃÇÁ
SS $db1[xjss] $db1[xp1ss] $db1[xp2ss] $nss
S $db1[xjs] $db1[xp1s] $db1[xp2s] $ns
M $db1[xjm] $db1[xp1m] $db1[xp2m] $nm
L $db1[xjl] $db1[xp1l] $db1[xp2l] $nl
XL $db1[xjxl] $db1[xp1xl] $db1[xp2xl] $n2xl
2XL $db1[xj2xl] $db1[xp12xl] $db1[xp22xl] $n3xl
3XL $db1[xj3xl] $db1[xp13xl] $db1[xp23xl] $n3xl
4XL - $db1[xp14xl] $db1[xp24xl] $n4xl
5XL - $db1[xp15xl] $db1[xp25xl] $n5xl
ÃÇÁàÊ×éÍ $cj $cp1 $cp2 $nt
ÃÇÁà§Ô¹ $bj $bp1 $bp2 $bt
THB; $sql="select * from sk1_sch where (jss+js+jm+jl+jxl+j2xl+j3xl+p1ss+p1s+p1m+p1l+p1xl+p12xl+p13xl+p14xl+p15xl+ p2ss+p2s+p2m+p2l+p2xl+p22xl+p23xl+p24xl+p25xl) > 0 order by sampur"; $result=mysql_query($sql); echo <<ÊÃØ»ÂÍ´ÊÑ觨ͧàÊ×éÍÈÔÅ»Ëѵ¶¡ÃÃÁ 2560 ʾ».ÈÃÕÊÐà¡É ࢵ 1 ¡ÅѺ TH; $rw=1; $tt=0; while ($db=mysql_fetch_array($result)) { $sj=$db[jss]+$db[js]+$db[jm]+$db[jl]+$db[jxl]+$db[j2xl]+$db[j3xl]; $sp1=$db[p1ss]+$db[p1s]+$db[p1m]+$db[p1l]+$db[p1xl]+$db[p12xl]+$db[p13xl]+$db[p14xl]+$db[p15xl]; $sp2=$db[p2ss]+$db[p2s]+$db[p2m]+$db[p2l]+ $db[p2xl]+$db[p22xl]+$db[p23xl]+$db[p24xl]+$db[p25xl]; $bj=$sj*390; $bp1=$sp1*250; $bp2=$sp2*250; $tsc=$sj+$sp1+$sp2; $baht=$bj+$bp1+$bp2; $sbaht=number_format($baht); echo ""; $rw++; $tjss+=$db[jss]; $tjs+=$db[js]; $tjm+=$db[jm]; $tjl+=$db[jl]; $tjxl+=$db[jxl]; $tj2xl+=$db[j2xl]; $tj3xl+=$db[j3xl]; $tp1ss+=$db[p1ss]; $tp1s+=$db[p1s]; $tp1m+=$db[p1m]; $tp1l+=$db[p1l]; $tp1xl+=$db[p1xl]; $tp12xl+=$db[p12xl]; $tp13xl+=$db[p13xl]; $tp14xl+=$db[p14xl]; $tp15xl+=$db[p15xl]; $tp2ss+=$db[p2ss]; $tp2s+=$db[p2s]; $tp2m+=$db[p2m]; $tp2l+=$db[p2l]; $tp2xl+=$db[p2xl]; $tp22xl+=$db[p22xl]; $tp23xl+=$db[p23xl]; $tp24xl+=$db[p24xl]; $tp25xl+=$db[p25xl]; $tt+=$tsc; $tbaht+=$baht; } $tbaht=number_format($tbaht); echo "
·Õè âçàÃÕ¹ ÍÓàÀÍ àÊ×éÍá¨ç¡à¡çµ àÊ×éÍâ»âÅ(ªÒÂ) àÊ×éÍâ»âÅ(Ë­Ô§) ÃÇÁ
(楀)
ÃÇÁà§Ô¹
(ºÒ·)
SS S M L XL 2XL 3XL SS S M L XL 2XL 3XL 4XL 5XL SS S M L XL 2XL 3XL 4XL 5XL
$rw $db[sname] $db[sampur] $db[jss] $db[js] $db[jm] $db[jl] $db[jxl] $db[j2xl] $db[j3xl] $db[p1ss] $db[p1s] $db[p1m] $db[p1l] $db[p1xl] $db[p12xl] $db[p13xl] $db[p14xl] $db[p15xl] $db[p2ss] $db[p2s] $db[p2m] $db[p2l] $db[p2xl] $db[p22xl] $db[p23xl] $db[p24xl] $db[p25xl] $tsc $sbaht
ÃÇÁ $tjss $tjs $tjm $tjl $tjxl $tj2xl $tj3xl $tp1ss $tp1s $tp1m $tp1l $tp1xl $tp12xl $tp13xl $tp14xl $tp15xl $tp2ss $tp2s $tp2m $tp2l $tp2xl $tp22xl $tp23xl $tp24xl $tp25xl $tt $tbaht
¡ÅѺ"; ?>