-- ±ž·Ýbbs7_post_71±íµÄÊýŸÝ
CREATE TABLE bbs7_post_71_replaceFloor_bak LIKE bbs7_post_71;
INSERT INTO bbs7_post_71_replaceFloor_bak SELECT * FROM bbs7_post_71 WHERE tid = 2022071;

-- »ÖžŽ
UPDATE bbs7_post_71 a SET a.floor = (SELECT b.floor FROM bbs7_post_71_replaceFloor_bak b WHERE a.pid=b.pid) 
WHERE a.pid IN  (SELECT pid FROM bbs7_post_71_replaceFloor_bak);
COMMIT
UPDATE bbs7_post_71 a SET a.createat = (SELECT b.createat FROM bbs7_post_71_replaceFloor_bak b WHERE a.pid=b.pid) 
WHERE a.pid IN  (SELECT pid FROM bbs7_post_71_replaceFloor_bak);
COMMIT

-- ÖŽÐÐÒÔÏÂÓïŸä
UPDATE bbs7_post_71 SET FLOOR = 90045, createat = '2014/08/19 00:32' WHERE FLOOR = 190806 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744074 AND FLOOR = 90045) OR (FLOOR > 90045 AND FLOOR < 190806));
UPDATE bbs7_post_71 SET FLOOR = 90096, createat = '2014/08/19 00:35' WHERE FLOOR = 190808 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744075 AND FLOOR = 90096) OR (FLOOR > 90096 AND FLOOR < 190808));
UPDATE bbs7_post_71 SET FLOOR = 91991, createat = '2014/08/19 06:40' WHERE FLOOR = 190809 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744076 AND FLOOR = 91991) OR (FLOOR > 91991 AND FLOOR < 190809));
UPDATE bbs7_post_71 SET FLOOR = 92028, createat = '2014/08/19 06:45' WHERE FLOOR = 190810 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744077 AND FLOOR = 92028) OR (FLOOR > 92028 AND FLOOR < 190810));
UPDATE bbs7_post_71 SET FLOOR = 92083, createat = '2014/08/19 06:57' WHERE FLOOR = 190811 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744066 AND FLOOR = 92083) OR (FLOOR > 92083 AND FLOOR < 190811));
UPDATE bbs7_post_71 SET FLOOR = 92114, createat = '2014/08/19 07:04' WHERE FLOOR = 190813 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744537 AND FLOOR = 92114) OR (FLOOR > 92114 AND FLOOR < 190813));
UPDATE bbs7_post_71 SET FLOOR = 92144, createat = '2014/08/19 07:11' WHERE FLOOR = 190814 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744071 AND FLOOR = 92144) OR (FLOOR > 92144 AND FLOOR < 190814));
UPDATE bbs7_post_71 SET FLOOR = 92203, createat = '2014/08/19 07:22' WHERE FLOOR = 190815 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744062 AND FLOOR = 92203) OR (FLOOR > 92203 AND FLOOR < 190815));
UPDATE bbs7_post_71 SET FLOOR = 92234, createat = '2014/08/19 07:29' WHERE FLOOR = 190816 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744536 AND FLOOR = 92234) OR (FLOOR > 92234 AND FLOOR < 190816));
UPDATE bbs7_post_71 SET FLOOR = 95587, createat = '2014/08/19 08:44' WHERE FLOOR = 190817 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744063 AND FLOOR = 95587) OR (FLOOR > 95587 AND FLOOR < 190817));
UPDATE bbs7_post_71 SET FLOOR = 140007, createat = '2014/08/20 10:23' WHERE FLOOR = 190818 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744535 AND FLOOR = 140007) OR (FLOOR > 140007 AND FLOOR < 190818));
UPDATE bbs7_post_71 SET FLOOR = 141009, createat = '2014/08/20 10:53' WHERE FLOOR = 190819 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744534 AND FLOOR = 141009) OR (FLOOR > 141009 AND FLOOR < 190819));
UPDATE bbs7_post_71 SET FLOOR = 141042, createat = '2014/08/20 10:54' WHERE FLOOR = 190820 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744064 AND FLOOR = 141042) OR (FLOOR > 141042 AND FLOOR < 190820));
UPDATE bbs7_post_71 SET FLOOR = 142046, createat = '2014/08/20 11:20' WHERE FLOOR = 190821 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744533 AND FLOOR = 142046) OR (FLOOR > 142046 AND FLOOR < 190821));
UPDATE bbs7_post_71 SET FLOOR = 143191, createat = '2014/08/20 12:01' WHERE FLOOR = 190822 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744065 AND FLOOR = 143191) OR (FLOOR > 143191 AND FLOOR < 190822));
UPDATE bbs7_post_71 SET FLOOR = 153230, createat = '2014/08/20 16:05' WHERE FLOOR = 190823 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744532 AND FLOOR = 153230) OR (FLOOR > 153230 AND FLOOR < 190823));
UPDATE bbs7_post_71 SET FLOOR = 153277, createat = '2014/08/20 16:06' WHERE FLOOR = 190824 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744067 AND FLOOR = 153277) OR (FLOOR > 153277 AND FLOOR < 190824));
UPDATE bbs7_post_71 SET FLOOR = 154028, createat = '2014/08/20 16:20' WHERE FLOOR = 190825 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744531 AND FLOOR = 154028) OR (FLOOR > 154028 AND FLOOR < 190825));
UPDATE bbs7_post_71 SET FLOOR = 150123, createat = '2014/08/20 14:57' WHERE FLOOR = 190826 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744530 AND FLOOR = 150123) OR (FLOOR > 150123 AND FLOOR < 190826));
UPDATE bbs7_post_71 SET FLOOR = 150267, createat = '2014/08/20 03:00' WHERE FLOOR = 190827 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744068 AND FLOOR = 150267) OR (FLOOR > 150267 AND FLOOR < 190827));
UPDATE bbs7_post_71 SET FLOOR = 180124, createat = '2014/08/21 06:28' WHERE FLOOR = 190828 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744079 AND FLOOR = 180124) OR (FLOOR > 180124 AND FLOOR < 190828));
UPDATE bbs7_post_71 SET FLOOR = 180422, createat = '2014/08/21 06:52' WHERE FLOOR = 190829 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744069 AND FLOOR = 180422) OR (FLOOR > 180422 AND FLOOR < 190829));
UPDATE bbs7_post_71 SET FLOOR = 180511, createat = '2014/08/21 07:02' WHERE FLOOR = 190830 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744529 AND FLOOR = 180511) OR (FLOOR > 180511 AND FLOOR < 190830));
UPDATE bbs7_post_71 SET FLOOR = 180782, createat = '2014/08/21 07:29' WHERE FLOOR = 190831 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744528 AND FLOOR = 180782) OR (FLOOR > 180782 AND FLOOR < 190831));
UPDATE bbs7_post_71 SET FLOOR = 180840, createat = '2014/08/21 07:35' WHERE FLOOR = 190832 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744080 AND FLOOR = 180840) OR (FLOOR > 180840 AND FLOOR < 190832));
UPDATE bbs7_post_71 SET FLOOR = 180936, createat = '2014/08/21 07:43' WHERE FLOOR = 190833 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744527 AND FLOOR = 180936) OR (FLOOR > 180936 AND FLOOR < 190833));
UPDATE bbs7_post_71 SET FLOOR = 184991, createat = '2014/08/21 10:41' WHERE FLOOR = 190834 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744081 AND FLOOR = 184991) OR (FLOOR > 184991 AND FLOOR < 190834));
UPDATE bbs7_post_71 SET FLOOR = 185056, createat = '2014/08/21 10:46' WHERE FLOOR = 190835 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744082 AND FLOOR = 185056) OR (FLOOR > 185056 AND FLOOR < 190835));
UPDATE bbs7_post_71 SET FLOOR = 185219, createat = '2014/08/21 10:57' WHERE FLOOR = 190836 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744072 AND FLOOR = 185219) OR (FLOOR > 185219 AND FLOOR < 190836));
UPDATE bbs7_post_71 SET FLOOR = 185280, createat = '2014/08/21 11:00' WHERE FLOOR = 190837 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744083 AND FLOOR = 185280) OR (FLOOR > 185280 AND FLOOR < 190837));
UPDATE bbs7_post_71 SET FLOOR = 185353, createat = '2014/08/21 11:05' WHERE FLOOR = 190838 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744088 AND FLOOR = 185353) OR (FLOOR > 185353 AND FLOOR < 190838));
UPDATE bbs7_post_71 SET FLOOR = 185391, createat = '2014/08/21 11:08' WHERE FLOOR = 190840 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744092 AND FLOOR = 185391) OR (FLOOR > 185391 AND FLOOR < 190840));
UPDATE bbs7_post_71 SET FLOOR = 185461, createat = '2014/08/21 11:12' WHERE FLOOR = 190841 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744093 AND FLOOR = 185461) OR (FLOOR > 185461 AND FLOOR < 190841));
UPDATE bbs7_post_71 SET FLOOR = 189390, createat = '2014/08/22 15:30' WHERE FLOOR = 190842 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744094 AND FLOOR = 189390) OR (FLOOR > 189390 AND FLOOR < 190842));
UPDATE bbs7_post_71 SET FLOOR = 189422, createat = '2014/08/22 15:36' WHERE FLOOR = 190843 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744095 AND FLOOR = 189422) OR (FLOOR > 189422 AND FLOOR < 190843));
UPDATE bbs7_post_71 SET FLOOR = 189452, createat = '2014/08/22 15:41' WHERE FLOOR = 190844 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744096 AND FLOOR = 189452) OR (FLOOR > 189452 AND FLOOR < 190844));
UPDATE bbs7_post_71 SET FLOOR = 189482, createat = '2014/08/22 15:46' WHERE FLOOR = 190845 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744097 AND FLOOR = 189482) OR (FLOOR > 189482 AND FLOOR < 190845));
UPDATE bbs7_post_71 SET FLOOR = 189511, createat = '2014/08/22 15:51' WHERE FLOOR = 190846 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744098 AND FLOOR = 189511) OR (FLOOR > 189511 AND FLOOR < 190846));
UPDATE bbs7_post_71 SET FLOOR = 189543, createat = '2014/08/22 15:57' WHERE FLOOR = 190847 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744100 AND FLOOR = 189543) OR (FLOOR > 189543 AND FLOOR < 190847));
UPDATE bbs7_post_71 SET FLOOR = 189573, createat = '2014/08/22 16:03' WHERE FLOOR = 190848 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744102 AND FLOOR = 189573) OR (FLOOR > 189573 AND FLOOR < 190848));
UPDATE bbs7_post_71 SET FLOOR = 189599, createat = '2014/08/22 16:08' WHERE FLOOR = 190849 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7743999 AND FLOOR = 189599) OR (FLOOR > 189599 AND FLOOR < 190849));
UPDATE bbs7_post_71 SET FLOOR = 189632, createat = '2014/08/22 16:15' WHERE FLOOR = 190850 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744011 AND FLOOR = 189632) OR (FLOOR > 189632 AND FLOOR < 190850));
UPDATE bbs7_post_71 SET FLOOR = 189662, createat = '2014/08/22 16:23' WHERE FLOOR = 190851 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744013 AND FLOOR = 189662) OR (FLOOR > 189662 AND FLOOR < 190851));
UPDATE bbs7_post_71 SET FLOOR = 189691, createat = '2014/08/22 16:32' WHERE FLOOR = 190852 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744015 AND FLOOR = 189691) OR (FLOOR > 189691 AND FLOOR < 190852));
UPDATE bbs7_post_71 SET FLOOR = 189721, createat = '2014/08/22 16:41' WHERE FLOOR = 190853 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744503 AND FLOOR = 189721) OR (FLOOR > 189721 AND FLOOR < 190853));
UPDATE bbs7_post_71 SET FLOOR = 189751, createat = '2014/08/22 16:50' WHERE FLOOR = 190854 AND tid = 2022071;
UPDATE bbs7_post_71 SET FLOOR = FLOOR + 1 WHERE tid = 2022071 AND ((uid <> 7744504 AND FLOOR = 189751) OR (FLOOR > 189751 AND FLOOR < 190854));
COMMIT;

