select count(csl_orders_goods) as idcount from ( select distinct(csl_orders_goods) as csl_orders_goods from chinashowlace_orders where csl_orders_userid = "&session("csl_user_id")&" --这里加入变量 ) t
select a.count(csl_orders_goods) as idcount from (select distinct(csl_orders_goods) from chinashowlace_orders where csl_orders_userid="&session("csl_user_id")&") a
(
select distinct(csl_orders_goods) as csl_orders_goods from chinashowlace_orders where csl_orders_userid = "&session("csl_user_id")&" --这里加入变量
) t