Showing
1 changed file
with
6 additions
and
1 deletions
@@ -25,4 +25,9 @@ CREATE TABLE `tbl_activity_topic` ( | @@ -25,4 +25,9 @@ CREATE TABLE `tbl_activity_topic` ( | ||
25 | `brand_id` int(10) unsigned NOT NULL, | 25 | `brand_id` int(10) unsigned NOT NULL, |
26 | `create_time` int(10) DEFAULT NULL, | 26 | `create_time` int(10) DEFAULT NULL, |
27 | PRIMARY KEY (`id`,`news_id`,`brand_id`) | 27 | PRIMARY KEY (`id`,`news_id`,`brand_id`) |
28 | - ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; | ||
28 | + ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; | ||
29 | +/** | ||
30 | + * 更新表记录 | ||
31 | + */ | ||
32 | +INSERT INTO tbl_activity_topic(title,place,start_time,end_time, create_time) SELECT title,place,start_time,end_time,UNIX_TIMESTAMP() FROM tbl_activity_plan; | ||
33 | +UPDATE tbl_activity_plan a,tbl_activity_topic b SET a.parent_id = b.id WHERE a.start_time=b.start_time AND a.end_time = b.end_time |
-
Please register or login to post a comment