$sql = “SELECT COUNT(*) FROM (SELECT COUNT(*) FROM `ds_member` INNER JOIN ds_order ON ds_member.id = ds_order.user_id GROUP BY ds_member.id ) AS a”;

$count = M()->query($sql);

$count = $count[0] [“COUNT(*)”];

发表评论

邮箱地址不会被公开。 必填项已用*标注