ลองเล่นแล้วมี err ครับ ในปุ่ม "ลงทะเบียนนอกเขต." ครับ
ผมสร้างหมู่บ้านเป็น 0 บ้าน เป็น 0 แล้ว ตอนกดปุ่ม ยืนยันการลงทะเียน person ก็ ok
หลัง Done มี err
13:12:16 Update error SQL Error: Duplicate entry '14' for key 1 SQL=select * from person where cid = '0000000020001' and cid is not null and cid<>''
sql trace
13:17:49 INSERT INTO person (person_id,house_id,cid,pname,fname,lname,pcode,sex,nationality,citizenship,education,occupation,religion,marrystatus,house_regist_type_id,birthdate,has_house_regist,chronic_disease_list,club_list,village_id,blood_group,current_age,death_date,hos_guid,income_per_year,home_position_id,family_position_id,drug_allergy,last_update,death,pttype,pttype_begin_date,pttype_expire_date,pttype_hospmain,pttype_hospsub,father_person_id,mother_person_id,pttype_no,sps_person_id,birthtime,age_y,age_m,age_d,family_id,person_house_position_id,couple_person_id) VALUES (16,5127,'0000000020001','¹Ò§ÊÒÇ','»ÃÕÂÒ ¨Ñ¹','ÅÙ¡¨éÒ§¤Ø³¹ÒÇÔ¹',NULL,'1','57','57',NULL,'403','01','1',NULL,'1971-10-08',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'40',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)
13:17:49 select * from person where cid = '0000000020001' and cid is not null and cid<>''
13:17:49 insert into `person` (`person_id`, `house_id`, `cid`, `pname`, `fname`, `lname`, `sex`, `nationality`, `citizenship`, `occupation`, `religion`, `marrystatus`, `birthdate`, `pttype`) values (16, 5127, '0000000020001', '¹Ò§ÊÒÇ', '»ÃÕÂÒ ¨Ñ¹', 'ÅÙ¡¨éÒ§¤Ø³¹ÒÇÔ¹', '1', '57', '57', '403', '01', '1', '1971-10-08', '40')
13:17:49 INSERT INTO person (person_id,house_id,cid,pname,fname,lname,pcode,sex,nationality,citizenship,education,occupation,religion,marrystatus,house_regist_type_id,birthdate,has_house_regist,chronic_disease_list,club_list,village_id,blood_group,current_age,death_date,hos_guid,income_per_year,home_position_id,family_position_id,drug_allergy,last_update,death,pttype,pttype_begin_date,pttype_expire_date,pttype_hospmain,pttype_hospsub,father_person_id,mother_person_id,pttype_no,sps_person_id,birthtime,age_y,age_m,age_d,family_id,person_house_position_id,couple_person_id) VALUES (16,5127,'0000000020001','¹Ò§ÊÒÇ','»ÃÕÂÒ ¨Ñ¹','ÅÙ¡¨éÒ§¤Ø³¹ÒÇÔ¹',NULL,'1','57','57',NULL,'403','01','1',NULL,'1971-10-08',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'40',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)
13:17:49 select * from person where cid = '0000000020001' and cid is not null and cid<>''
13:17:49 UNLOCK TABLES
13:17:49 select serial_no from serial where name='person_id'
13:17:49 update serial set serial_no=serial_no+1 where name='person_id'
13:17:49 LOCK TABLES serial WRITE
13:17:49 select count(*) as cc from serial where name='person_id'
13:17:49 select * from person where cid = '0000000020001' and cid is not null and cid<>''
13:17:49 select * from patient where hn = '470018307'
13:16:24 select house_id from house where village_id = 17 order by house_id desc limit 1
13:16:24 select count(*) as cc from house where village_id = 17
13:16:24 select village_id from village where village_moo = '0'
13:16:24 select count(*) as cc from village where village_moo = '0'
13:16:24 select person_id from person where cid = '0000000020001' and cid is not null and cid<>''
13:16:24 select cid from patient where hn = '470018307'
13:16:03 INSERT INTO person