<?php
	session_start();
	
	$strret = '#';
		
	header("Content-type: text/html; charset=gb2312"); 
	
	require_once("db/db.php");	
	require_once("common/common.php");
	
	//得到购物车号和会员号
	$strselBillNo=trim($_REQUEST['selbillno']);
	$strDlistNo=trim($_REQUEST['DList']);
	$strTableNo=trim($_REQUEST['TabNo']);
	$strSelTableNo ="";
	
	//得到当前使用系统的关键字：会员号，微信号，临时购物号
	$sql = sprintf("SELECT TableNo FROM TCP_Table_Inform a,TCP_Table_Type b Where a.TypeListNo=b.ListNo And b.DListNo=%s And TableNo='%s'",$strDlistNo,$strTableNo);
	$result = querySql($sql);
	
	if($row = fetch_array($result))
	{
		$strSelTableNo = $row['TableNo'];
	}
	freeResult($result);	//释放数据库
	
	if(strlen($strSelTableNo)>0)
	{
		$sql = sprintf("UPDATE WX_Bill_Inform Set TableNo='%s' Where Bill_No='%s' And BillState=0",$strSelTableNo,$strselBillNo);
		
		if(executeSql($sql))
		{
			$strret="*";
		}
	}
	closeDb();	
	echo $strret;
	
?>



