?
Solved

mysql Warning: mysql_fetch_assoc() expects parameter 1

Posted on 2012-09-17
3
Medium Priority
?
845 Views
Last Modified: 2012-09-17
How can i fix this problem Mysql

Warning: mysql_fetch_assoc() expects parameter 1 

Open in new window

to be resource, array given in C:\wamp\www\asian\Connections\quaotation.php on line 1437




$slelectsum = mysql_query($query_sum, $aoldatabase) or die(mysql_error());

$totalRows_slelectsum = mysql_num_rows($slelectsum);

while ($slelectsum = mysql_fetch_assoc($slelectsum)) {
    $allrowsum[] = $slelectsum;
}
for ($i=0; $i<count($allrowsum); $i++)




<?php
header ('Content-type: text/html; charset=utf-8');
// 1349
?> 

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-874">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 12">
<link rel=File-List href="invoice_files/filelist.xml">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
x\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style id="asian10_21921_Styles">
<!--table
	{mso-displayed-decimal-separator:"\.";
	mso-displayed-thousand-separator:"\,";}
.xl1521921
	{padding:0px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:222;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl6521921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Arial, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl6621921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl6721921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:6.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl6821921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Arial, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl6921921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:right;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl7021921
	{padding:0px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:222;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl7121921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:7.8pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:right;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl7221921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:6.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:right;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl7321921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl7421921
	{padding:0px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl7521921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:right;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl7621921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Arial, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl7721921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Arial, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:right;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl7821921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	border-top:none;
	border-right:none;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl7921921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:7.8pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:1.0pt solid windowtext;
	border-right:1.0pt solid windowtext;
	border-bottom:.5pt solid windowtext;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl8021921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl8121921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:7.8pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:none;
	border-right:none;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl8221921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:7.8pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:1.0pt solid windowtext;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl8321921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:7.8pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl8421921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:none;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl8521921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl8621921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:Standard;
	text-align:right;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:none;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl8721921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:Standard;
	text-align:right;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:none;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl8821921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl8921921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:1.0pt solid windowtext;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl9021921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:none;
	border-right:none;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl9121921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:Standard;
	text-align:right;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:1.0pt solid windowtext;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl9221921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:Standard;
	text-align:right;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl9321921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:Standard;
	text-align:general;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:none;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl9421921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:right;
	vertical-align:bottom;
	border-top:none;
	border-right:none;
	border-bottom:none;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl9521921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:"MS Sans Serif", sans-serif;
	mso-font-charset:222;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl9621921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:"MS Sans Serif", sans-serif;
	mso-font-charset:222;
	mso-number-format:General;
	text-align:right;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl9721921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	border-top:none;
	border-right:none;
	border-bottom:1.0pt solid windowtext;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl9821921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:1.0pt solid windowtext;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl9921921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:7.8pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl10021921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl10121921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl10221921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:"MS Sans Serif", sans-serif;
	mso-font-charset:222;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl10321921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:7.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:"MS Sans Serif", sans-serif;
	mso-font-charset:222;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl10421921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:9.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:right;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl10521921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:1.0pt solid windowtext;
	border-right:none;
	border-bottom:.5pt solid windowtext;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl10621921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:none;
	border-right:none;
	border-bottom:none;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl10721921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	
	border-right:none;
	border-bottom:none;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl10821921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	border-top:none;
	border-right:none;
	border-bottom:none;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl10921921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:none;
	border-right:none;
	border-bottom:1.0pt solid windowtext;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl11021921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	border-top:none;
	border-right:none;

	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl11121921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid black;
	border-bottom:none;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl11221921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl11321921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid black;
	border-bottom:none;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl11421921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	border-top:1.0pt solid windowtext;
	border-right:none;
	border-bottom:none;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl11521921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	border-top:1.0pt solid windowtext;
	border-right:1.0pt solid black;
	border-bottom:none;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl11621921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid black;
	border-bottom:none;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl11721921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	border-top:none;
	border-right:none;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl11821921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid black;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl11921921
	{padding:0px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:222;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid black;
	border-bottom:none;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl12021921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl12121921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:6.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:"MS Sans Serif", sans-serif;
	mso-font-charset:222;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl12221921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:6.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Arial, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl12321921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Arial, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:left;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl12421921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:"MS Sans Serif", sans-serif;
	mso-font-charset:222;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl12521921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:"MS Sans Serif", sans-serif;
	mso-font-charset:222;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl12621921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:1.0pt solid windowtext;
	border-right:none;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl12721921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:7.8pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:1.0pt solid windowtext;
	border-right:none;
	border-bottom:1.0pt solid windowtext;
	border-left:1.0pt solid windowtext;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl12821921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:center;
	vertical-align:bottom;
	border-top:1.0pt solid windowtext;
	border-right:1.0pt solid black;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl12921921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	border-top:1.0pt solid windowtext;
	border-right:none;
	border-bottom:none;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl13021921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	border-top:1.0pt solid windowtext;
	border-right:1.0pt solid black;
	border-bottom:none;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
.xl13121921
	{padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:700;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:right;
	vertical-align:bottom;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
	a.mylink {color:black; text-decoration:none;}
.xl92219211 {padding:0px;
	mso-ignore:padding;
	color:windowtext;
	font-size:8.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Tahoma, sans-serif;
	mso-font-charset:0;
	mso-number-format:Standard;
	text-align:right;
	vertical-align:bottom;
	border-top:none;
	border-right:1.0pt solid windowtext;
	border-bottom:1.0pt solid windowtext;
	border-left:none;
	mso-background-source:auto;
	mso-pattern:auto;
	white-space:nowrap;}
-->
</style>
</head>

<body>
<!--[if !excel]>&nbsp;&nbsp;<![endif]-->
<!--The following information was generated by Microsoft Office Excel's Publish
as Web Page wizard.-->
<!--If the same item is republished from Excel, all information between the DIV
tags will be replaced.-->
<!----------------------------->
<!--START OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD -->
<!----------------------------->

<div id="asian10_21921" align=center x:publishsource="Excel"><!--The following information was generated by Microsoft Office Excel's Publish
as Web Page wizard.--><!--If the same item is republished from Excel, all information between the DIV
tags will be replaced.--><!-----------------------------><!--START OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD --><!----------------------------->




<?php 
session_start();
$vat = 7 ;
require_once('../Connections/aoldatabase.php'); 
$invoiceno =  $_SESSION['invoiceno']; 

/** 
*  Function:   convert_number 
*
*  Description: 
*  Converts a given integer (in range [0..1T-1], inclusive) into 
*  alphabetical format ("one", "two", etc.)
*
*  @int
*
*  @return string
*
*/ 
function convert_number($number) 
{ 
    if (($number < 0) || ($number > 999999999)) 
    { 
    throw new Exception("Number is out of range");
    } 

    $Gn = floor($number / 1000000);  /* Millions (giga) */ 
    $number -= $Gn * 1000000; 
    $kn = floor($number / 1000);     /* Thousands (kilo) */ 
    $number -= $kn * 1000; 
    $Hn = floor($number / 100);      /* Hundreds (hecto) */ 
    $number -= $Hn * 100; 
    $Dn = floor($number / 10);       /* Tens (deca) */ 
    $n = $number % 10;               /* Ones */ 

    $res = ""; 

    if ($Gn) 
    { 
        $res .= convert_number($Gn) . " Million"; 
    } 

    if ($kn) 
    { 
        $res .= (empty($res) ? "" : " ") . 
            convert_number($kn) . " Thousand"; 
    } 

    if ($Hn) 
    { 
        $res .= (empty($res) ? "" : " ") . 
            convert_number($Hn) . " Hundred"; 
    } 

    $ones = array("", "One", "Two", "Three", "Four", "Five", "Six", 
        "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", 
        "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eightteen", 
        "Nineteen"); 
    $tens = array("", "", "Twenty", "Thirty", "Fourty", "Fifty", "Sixty", 
        "Seventy", "Eigthy", "Ninety"); 

    if ($Dn || $n) 
    { 
        if (!empty($res)) 
        { 
            $res .= " and "; 
        } 

        if ($Dn < 2) 
        { 
            $res .= $ones[$Dn * 10 + $n]; 
        } 
        else 
        { 
            $res .= $tens[$Dn]; 

            if ($n) 
            { 
                $res .= "-" . $ones[$n]; 
            } 
        } 
    } 

    if (empty($res)) 
    { 
        $res = "zero"; 
    } 

    return $res; 
} 



mysql_select_db($database_aoldatabase, $aoldatabase);

$query_sale = "select quaotaionhead.id,quaotaionhead.customername,quaotaionhead.attn,quaotaionhead.quadate,quaotaionhead.remark FROM quaotaionhead WHERE quaotaionhead.id =  1 ";

$salerecord = mysql_query($query_sale, $aoldatabase) or die(mysql_error());

while ($row_salerecord = mysql_fetch_assoc($salerecord)) {
    $allrowshead[] = $row_salerecord;
}


$query_slelectPresell = "SELECT
quatatindetail.id,
quatatindetail.productname,
quatatindetail.quationid,
quatatindetail.productprice,
quatatindetail.remark,
quatatindetail.quantity,
quatatindetail.uniteprice
FROM
quatatindetail
ORDER BY
quatatindetail.id ASC";

$query_sum = "SELECT SUM(quantity*uniteprice) as grandtotal
FROM
quatatindetail
WHERE quationid =1";

$slelectPresell = mysql_query($query_slelectPresell, $aoldatabase) or die(mysql_error());

$totalRows_slelectPresell = mysql_num_rows($slelectPresell);

while ($row_slelectPresell = mysql_fetch_assoc($slelectPresell)) {
    $allrows[] = $row_slelectPresell;
}
for ($i=0; $i<count($allrows); $i++)



$slelectsum = mysql_query($query_sum, $aoldatabase) or die(mysql_error());

$totalRows_slelectsum = mysql_num_rows($slelectsum);

while ($slelectsum = mysql_fetch_assoc($slelectsum)) {
    $allrowsum[] = $slelectsum;
}
for ($i=0; $i<count($allrowsum); $i++)


?>




<table border=0 cellpadding=0 cellspacing=0 width=1024 style='border-collapse:
 collapse;table-layout:fixed;width:770pt'>
 <col class=xl6521921 width=33 style='mso-width-source:userset;mso-width-alt:
 1056;width:25pt'>
 <col class=xl6521921 width=48 style='mso-width-source:userset;mso-width-alt:
 1536;width:36pt'>
 <col width=26 style='mso-width-source:userset;mso-width-alt:832;width:20pt'>
 <col width=59 style='mso-width-source:userset;mso-width-alt:1888;width:44pt'>
 <col width=65 span=2 style='mso-width-source:userset;mso-width-alt:2080;
 width:49pt'>
 <col width=66 style='mso-width-source:userset;mso-width-alt:2112;width:50pt'>
 <col width=69 style='mso-width-source:userset;mso-width-alt:2208;width:52pt'>
 <col width=38 style='mso-width-source:userset;mso-width-alt:1216;width:29pt'>
 <col width=77 style='mso-width-source:userset;mso-width-alt:2464;width:58pt'>
 <col width=91 style='mso-width-source:userset;mso-width-alt:2912;width:68pt'>
 <col width=67 style='mso-width-source:userset;mso-width-alt:2144;width:50pt'>
 <col width=64 span=5 style='mso-width-source:userset;mso-width-alt:2048;
 width:48pt'>
 <tr height=15 style='mso-height-source:userset;height:11.25pt'>
  <td colspan="2" rowspan="6" align=left
  valign=top style='height:11.25pt;width:25pt'><![if !vml]><![endif]><span
  style='mso-ignore:vglayout2'>
    <table cellpadding=0 cellspacing=0>
      
      </table>
    <img src="image1.png" width="81" height="92" style="border:none;>  </span></td>
  <td width=26 height="15" class=xl6621921 style='width:20pt'></td>
  <td class=xl6821921 width=38 style='width:29pt'></td>
  <td colspan=4 class=xl6721921 align=left width=255 style='width:192pt'>¿¿¿¿¿¿
  ¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ (Asian Online Co.,Ltd.)</td>
  <td class=xl6721921 width=69 style='width:52pt'></td>
  <td class=xl6821921 width=38 style='width:29pt'></td>
  <td colspan=2 class=xl6921921 width=168 style='width:126pt'>¿¿¿¿¿¿¿¿¿¿</td>
  <td class=xl6621921 width=67 style='width:50pt'></td>
  <td class=xl6521921 width=64 style='width:48pt'></td>
  <td class=xl6521921 width=64 style='width:48pt'></td>
  <td class=xl6521921 width=64 style='width:48pt'></td>
  <td class=xl6521921 width=64 style='width:48pt'></td>
  <td class=xl6521921 width=64 style='width:48pt'></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height="17" class=xl6621921></td>
  <td colspan=4 class=xl6721921 align=left>29/5 ¿¿¿¿ 3 ¿.¿¿¿¿¿¿¿ ¿.¿¿¿¿¿¿¿¿
  ¿.¿¿¿¿¿¿¿¿¿¿¿¿ 84140</td>
  <td class=xl6521921></td>
  <td colspan=3 class=xl6921921>Quatation</td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height="17" class=xl6621921></td>
  <td colspan=4 class=xl6721921 align=left>29/5 Moo 3 T. Angthong A. Koh Samui
  Suratthani 84140 Thailand</td>
  <td class=xl6721921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7121921><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;
  </span></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=16 style='mso-height-source:userset;height:12.0pt'>
  <td height="16" class=xl6621921></td>
  <td colspan=4 class=xl6721921 align=left>Tel.(077)-420851 Fax.(077)-421039</td>
  <td class=xl7221921>¿¿¿¿¿¿:</td>
  <td class=xl7321921><?php 
  for ($i=0; $i<count($allrowshead); $i++)
{
        echo $allrowshead[$i]["id"];
        
}
  
   ?></td>
  <td class=xl6521921></td>
  <td class=xl7121921>¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿</td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height="17" class=xl6621921></td>
  <td colspan=4 class=xl6721921 align=left></td>
  <td class=xl7221921>¿¿¿¿¿¿:</td>
  <td class=xl7321921><?php 
  for ($i=0; $i<count($allrowshead); $i++)
{
     //   echo $allrowshead[$i]["name"];
  list($Year,$Month,$Day) = explode('-', $allrowshead[$i]["quadate"]);
  echo $Day."/". $Month. "/". $Year;

}
  
   ?></td>
  <td class=xl6621921></td>
  <td class=xl7421921>A</td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height="17" class=xl6621921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl6721921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl6621921></td>
  <td class=xl7021921></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>

  <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl7521921 style='height:12.75pt'><a href="presalefromS20.php" style='color:#000000; text-decoration:none;'>¿¿¿¿:</td>
  <td colspan=10 class=xl11221921><span
  style='mso-spacerun:yes'><?php 
  for ($i=0; $i<count($allrowshead); $i++)
{
        echo $allrowshead[$i]["customername"];
        
}
  
   ?></span></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl7521921 style='height:12.75pt'>¿¿¿¿¿¿¿ :</td>
  <td colspan=10 class=xl11221921><span
  style='mso-spacerun:yes'></span></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl6521921 style='height:12.75pt'></td>
  <td colspan=10 class=xl7821921>&nbsp;</td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=18 style='mso-height-source:userset;height:13.5pt'>
  <td height=18 class=xl7921921 style='height:13.5pt'>¿¿¿¿¿</td>
  <td colspan=7 class=xl12721921 style='border-right:1.0pt solid black;
  border-left:none'>¿¿¿¿¿¿</td>
  <td class=xl8121921>¿¿¿¿¿</td>
  <td class=xl8221921>¿¿¿¿¿¿¿</td>
  <td class=xl8321921><span
  style='mso-spacerun:yes'>
  </span>¿¿¿¿¿¿¿¿¿</td>
   </tr>
   <?php
   $orderit = 0 ;
 for ($i=0; $i<count($allrows); $i++)
{    
$orderit  =  $i +1 ;
?> <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl8421921 style='height:12.75pt'><?php echo "$orderit " ; ?></td>
  <td colspan=7 class=xl10721921 style='border-right:1.0pt solid black;
  border-left:none'><?php echo $allrows[$i]["productname"]; ?></td>
  <td class=xl8521921><?php echo $allrows[$i]["quantity"]; ?></td>
  <td class=xl8621921><?php echo $allrows[$i]["uniteprice"]; ?></td>
  <td class=xl8721921><?php echo $allrows[$i]["quantity"]* $allrows[$i]["uniteprice"] ; ?></td>
     </tr>
     <?php } 
while ($orderit  < 10)
{  ?>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl8421921 style='height:12.75pt'><?php echo  "" ; ?></td>
  <td colspan=7 class=xl10721921 style='border-right:1.0pt solid black;
  border-left:none'><?php echo  "" ; ?></td>
  <td class=xl8521921> <?php echo  "" ; ?></td>
  <td class=xl8621921> <?php echo  "" ; ?></td>
  <td class=xl8721921><?php echo  "" ; ?></td>
     </tr>
 
 
<?php 
   $orderit++;
}
   ?>




 <tr height=18 style='mso-height-source:userset;height:13.5pt'>
  <td   height=18 class=xl8921921 style='height:13.5pt'><?php 

  for ($i=0; $i<count($allrowshead); $i++)
{
     $textg = $allrowsum[$i]["grandtotal"];
		$cheque_amt = "$textg"; 

$split = explode(".",$cheque_amt);
    $output = convert_number($split[0])." baht and ";
    if (isset($split[1])){
        $output .= convert_number($split[1])." satang";   
    }

echo $output; 
        
}
  

  
  
  
  
  ?></td>
  <td colspan=7 class=xl11021921 style='border-right:1.0pt solid black;
  border-left:none'>&nbsp;</td>
  <td class=xl9021921>&nbsp;</td>
  <td class=xl9121921>&nbsp;</td>
  <td class=xl9221921>
  
   </td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td colspan=9 height=17 class=xl12921921 style='border-right:1.0pt solid black;
  height:12.75pt'>&nbsp;</td>
  <td class=xl7521921>¿¿¿¿¿¿¿¿¿¿</td>
  <td class=xl9321921 align=right><?php 
  for ($i=0; $i<count($allrowshead); $i++)
{
        echo $allrowsum[$i]["grandtotal"]/1.07;
        
}
  
   ?></td>
  
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl6621921 style='height:12.75pt'></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl9421921><span style='mso-spacerun:yes'>&nbsp;
  </span>¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿</td>
  <td class=xl9321921 align=right><?php 
  for ($i=0; $i<count($allrowshead); $i++)
{
        echo $allrowsum[$i]["grandtotal"]/1.07*.07 ;
        
}
  
   ?></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl6621921 style='height:12.75pt'></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl9421921>¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿</td>
  <td class=xl9321921 align=right><?php 
  for ($i=0; $i<count($allrowshead); $i++)
{
        echo $allrowsum[$i]["grandtotal"];
        
}
  
   ?></td>
  <td class=xl6621921></td>
  <td class=xl9621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=7 style='mso-height-source:userset;height:5.25pt'>
  <td height=7 class=xl6621921 style='height:5.25pt'></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl9721921></td>
  <td class=xl9821921></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=3 style='mso-height-source:userset;height:2.25pt'>
  <td height=3 class=xl6621921 style='height:2.25pt'></td>
  <td colspan=10 class=xl9921921></td>
  <td class=xl10021921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>

<tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl6521921 style='height:12.75pt'></td>
  <td class=xl6521921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td colspan=2 height=17 class=xl10121921 align=left style='height:12.75pt'><span
  style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span></td>
  <td class=xl10121921></td>
  <td class=xl10121921></td>
  <td colspan=2 class=xl8021921><span
  style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span>¿¿¿¿¿¿¿¿¿¿¿¿</td>
  <td class=xl8821921></td>
  <td class=xl8821921></td>
  <td colspan=2 class=xl10121921 align=left><span
  style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span>¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿</td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl6521921 style='height:12.75pt'></td>
  <td class=xl6521921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl6621921 style='height:12.75pt'></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl6621921 style='height:12.75pt'></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
 <tr height=17 style='mso-height-source:userset;height:12.75pt'>
  <td height=17 class=xl6521921 style='height:12.75pt'></td>
  <td class=xl6521921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl7021921></td>
  <td class=xl6621921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
  <td class=xl6521921></td>
 </tr>
</table >

Open in new window

0
Comment
Question by:teera
3 Comments
 
LVL 39

Assisted Solution

by:Pratima Pharande
Pratima Pharande earned 400 total points
ID: 38404613
Either your query is failing, or the variable is being lost somewhere.
check syntax of query

http://php.net/mysql_fetch_assoc

I'm fairly certain you're query is failing. You should check the return of mysql_query and if it's false, then check mysql_error().

refer
http://stackoverflow.com/questions/7706973/mysql-fetch-assoc-expects-parameter-1-to-be-resource-boolean-given
0
 
LVL 39

Assisted Solution

by:Roger Baklund
Roger Baklund earned 400 total points
ID: 38404706
This is wrong:

while ($slelectsum = mysql_fetch_assoc($slelectsum)) {

Open in new window


On the first iteration, the $slelectsum variable holding the query result is overwritten by a single record. On the next iteration it fails, as $slelectsum now is an array, not a mysql query result resource.
0
 
LVL 82

Accepted Solution

by:
hielo earned 1200 total points
ID: 38405797
credit to cxr.

Change:
while ($slelectsum = mysql_fetch_assoc($slelectsum)) {
    $allrowsum[] = $slelectsum;
}

to:
while ($row = mysql_fetch_assoc($slelectsum)) {
    $allrowsum[] = $row;
}
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question