function stone($account){
$query= mssql_query("declare @it varbinary(1200);
set @it=(select [Items] from [warehouse] where [AccountID]='$account');
print @it");
$items = substr(mssql_get_last_message(),2);
$br=0;
for($i=0;$i<120;$i++){
if(substr($items,$i*20,4)=="D508"){$br++;$items=substr_replace($items,"FFFFFFFFFFFFFFFFFFFF",$i*20,20);}
}
$new_warehouse=mssql_query("update [warehouse] set [Items]=0x$items where [AccountID]='$account'");
return $br;
}