沉冰浮水

沉冰浮水

做最终到的事,成为最终成为的人!
github
bilibili
mastodon
zhihu
douban

"Some SQL statements"

A memo of some commands that are occasionally used, mainly related to Z-BlogPHP;

Query for Duplicate Article Aliases#

SELECT * FROM `zbp_post` WHERE `log_Alias` IN (SELECT `log_Alias` FROM `zbp_post` GROUP BY `log_Alias` HAVING COUNT(`log_Alias`)>1)

Replace Image URLs#

update `zbp_post` set `log_Content`=(REPLACE(`log_Content`,'{#ZC_BLOG_HOST#}zb_users/upload/','https://cdn.adadd.com/XXXXX/'));
SELECT * FROM `zbp_post` WHERE `log_Content` LIKE '%202012141607949338840263%';
SELECT * FROM `zbp_post` WHERE `log_Content` LIKE '%{#ZC_BLOG_HOST#}zb_users/%';

Modify Comment Author ID#

When switching from ASP to PHP, my own comment reply records were not associated with the user table - -;

-- The effect is the same in both cases
UPDATE `zbp_comment` SET `comm_AuthorID` = 1 WHERE `comm_Name` = '沉冰浮水' AND `comm_AuthorID` = 0
UPDATE `zbp_comment` SET `comm_AuthorID` = 1 WHERE `comm_Name` = '沉冰浮水'
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.