|
 |
|
ขอแนวทางในการออกรายงานดังรูปตัวอย่างที่ผมแนบมาให้หน่อยครับ |
|
 |
|
|
 |
 |
|
Code (PHP)
CREATE TABLE `inform_repair` (
`ir_id` int(5) unsigned NOT NULL auto_increment,
`ir_building` varchar(50) collate utf8_unicode_ci NOT NULL,
`ir_equipment` varchar(50) collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`ir_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=9 ;
--
-- dump ตาราง `inform_repair`
--
INSERT INTO `inform_repair` VALUES (1, 'อาคารA', 'คอมพิวเตอร์');
INSERT INTO `inform_repair` VALUES (2, 'อาคารA', 'คอมพิวเตอร์');
INSERT INTO `inform_repair` VALUES (3, 'อาคารB', 'เครื่อง Printer');
INSERT INTO `inform_repair` VALUES (4, 'อาคารA', 'เครื่อง Printer');
INSERT INTO `inform_repair` VALUES (5, 'อาคารB', 'เครื่อง Printer');
INSERT INTO `inform_repair` VALUES (6, 'อาคารA', 'Air');
INSERT INTO `inform_repair` VALUES (7, 'เครื่องA', 'คอมพิวเตอร์');
INSERT INTO `inform_repair` VALUES (8, 'อาคารB', 'พัดลม');

Tag : PHP

|
|
 |
 |
 |
 |
Date :
2013-11-14 00:06:00 |
By :
TeeKub |
View :
691 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code
SELECT * , count(ir_building) as building_c , count(ir_equipment) as equipment_c from inform_repair group by ir_building , ir_equipment
query ประมาณนี้ได้ไหมอ่าครับ
|
ประวัติการแก้ไข 2013-11-14 00:46:36 2013-11-14 00:49:59
 |
 |
 |
 |
Date :
2013-11-14 00:45:16 |
By :
dreamt256 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ยังงงอยู่ครับขอตัวอย่างได้มั้ยครับ ขอบคุณครับ
|
 |
 |
 |
 |
Date :
2013-11-14 01:06:46 |
By :
TeeKub |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
รอท่านอื่นก่อนเลยครับ ต้องขอตัวไปโรงเรียนก่อนครับ ขอโทษจริงๆนะครับ
|
 |
 |
 |
 |
Date :
2013-11-14 06:22:32 |
By :
dreamt256 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ทำได้แล้วครับขอบคุณครับ
|
 |
 |
 |
 |
Date :
2013-11-14 06:39:58 |
By :
TeeKub |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|