统计数量并返回
mysql,5.1,有如下sql语句,
-- ----------------------------
-- Table structure for `ppmytj`
-- ----------------------------
DROP TABLE IF EXISTS `ppmytj`;
CREATE TABLE `ppmytj` (
`id` int(11) NOT NULL auto_increment,
`ques` varchar(255) NOT NULL,
`typename` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=gbk;
-- ----------------------------
-- Records of ppmytj
-- ----------------------------
INSERT INTO `ppmytj` VALUES ('31', '点石家装', 'decorationcompany');
INSERT INTO `ppmytj` VALUES ('32', '宇杰装饰', 'decorationcompany');
INSERT INTO `ppmytj` VALUES ('33', '鼎佳装饰', 'decorationcompany');
INSERT INTO `ppmytj` VALUES ('34', '马可波罗瓷砖', 'stone');
INSERT INTO `ppmytj` VALUES ('35', '宏陶陶瓷', 'stone');
INSERT INTO `ppmytj` VALUES ('36', '菲林格尔', 'floors');
INSERT INTO `ppmytj` VALUES ('37', '马克森地板', 'floors');
INSERT INTO `ppmytj` VALUES ('38', '三星地板', 'floors');
INSERT INTO `ppmytj` VALUES ('39', '法瑞集成环保灶', 'kitchen');
INSERT INTO `ppmytj` VALUES ('40', '老板电器', 'kitchen');
INSERT INTO `ppmytj` VALUES ('41', '方太电器', 'kitchen');
INSERT INTO `ppmytj` VALUES ('42', '尚高卫浴', 'bathroom');
INSERT INTO `ppmytj` VALUES ('43', '九牧卫浴', 'bathroom');
INSERT INTO `ppmytj` VALUES ('44', '奥特朗电热水器', 'bathroom');
INSERT INTO `ppmytj` VALUES ('45', '宝兰吊顶', 'ceilings');
INSERT INTO `ppmytj` VALUES ('46', '楚楚吊顶', 'ceilings');
INSERT INTO `ppmytj` VALUES ('47', '扬子集成吊顶', 'ceilings');
INSERT INTO `ppmytj` VALUES ('48', '绿娃门窗', 'doorwindow');
INSERT INTO `ppmytj` VALUES ('49', '欧派木门', 'doorwindow');
INSERT INTO `ppmytj` VALUES ('50', '盼盼安居门', 'doorwindow');
INSERT INTO `ppmytj` VALUES ('51', '马克森衣柜', 'furniture');
INSERT INTO `ppmytj` VALUES ('52', '九鑫家俬', 'furniture');
INSERT INTO `ppmytj` VALUES ('53', '巨桑家私', 'furniture');
INSERT INTO `ppmytj` VALUES ('54', '欧特朗照明', 'buildingmaterials');
INSERT INTO `ppmytj` VALUES ('55', '朗斯地暖', 'buildingmaterials');
INSERT INTO `ppmytj` VALUES ('56', '欧雅壁纸', 'decoration');
INSERT INTO `ppmytj` VALUES ('57', '瑞丽布艺', 'decoration');
INSERT INTO `ppmytj` VALUES ('58', '青花瓷墙纸', 'decoration');
INSERT INTO `ppmytj` VALUES ('59', '宏图三胞', 'appliancestores');
INSERT INTO `ppmytj` VALUES ('60', '商之都.国生电器', 'appliancestores');
INSERT INTO `ppmytj` VALUES ('61', '壹品装饰', 'decorationcompany');
INSERT INTO `ppmytj` VALUES ('62', '喜来登装饰', 'decorationcompany');
INSERT INTO `ppmytj` VALUES ('63', '光明美家', 'decorationcompany');
INSERT INTO `ppmytj` VALUES ('64', '金舵陶瓷', 'stone');
INSERT INTO `ppmytj` VALUES ('65', '诺贝尔瓷砖', 'stone');
INSERT INTO `ppmytj` VALUES ('66', '百得防水', 'stone');
INSERT INTO `ppmytj` VALUES ('67', '冠珠陶瓷', 'stone');
INSERT INTO `ppmytj` VALUES ('68', '大自然地板', 'floors');
INSERT INTO `ppmytj` VALUES ('69', '兔宝宝板材', 'floors');
INSERT INTO `ppmytj` VALUES ('70', '世友地板', 'floors');
INSERT INTO `ppmytj` VALUES ('71', '法瑞集成环保灶', 'kitchen');
INSERT INTO `ppmytj` VALUES ('72', '志邦厨柜', 'kitchen');
INSERT INTO `ppmytj` VALUES ('73', '康佳厨卫电器', 'kitchen');
INSERT INTO `ppmytj` VALUES ('74', '桑夏太阳能', 'bathroom');
INSERT INTO `ppmytj` VALUES ('75', '华帝太阳能', 'bathroom');
INSERT INTO `ppmytj` VALUES ('76', '皇明太阳能', 'bathroom');
INSERT INTO `ppmytj` VALUES ('77', '德国欧卫集成吊顶', 'ceilings');
INSERT INTO `ppmytj` VALUES ('78', '扬子集成吊顶', 'ceilings');
INSERT INTO `ppmytj` VALUES ('79', '友邦集成吊顶', 'ceilings');
INSERT INTO `ppmytj` VALUES ('80', '合室家室内门', 'doorwindow');
INSERT INTO `ppmytj` VALUES ('81', '大洋豪门', 'doorwindow');
INSERT INTO `ppmytj` VALUES ('82', '扬金移门', 'doorwindow');
INSERT INTO `ppmytj` VALUES ('83', '美蒂娅移门整体衣柜', 'furniture');
INSERT INTO `ppmytj` VALUES ('84', '巨桑家私', 'furniture');
INSERT INTO `ppmytj` VALUES ('85'