最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

posts - Trigger on DB make problem on wordpress?

programmeradmin0浏览0评论

If i insert a trigger for wp_posts table, wordpress make me impossible to publish posts,forums,articles.

And get error: "You don't have permission for publish".

How it should bee(it's without trigger on db)

Error below:

trigger code: CREATE TRIGGER added_new_forum AFTER INSERT ON wp_posts FOR EACH ROW BEGIN IF(post_type='forum' AND post_status='publish') THEN INSERT INTO wp_posts(ID,post_author,post_date,post_date_gmt,post_content,post_title,post_excerpt,post_status,comment_status,ping_status,post_password,post_name,to_ping,pinged,post_modified,post_modified_gmt,post_content_filtered,post_parent,guid,menu_order,post_type,post_mime_type,comment_count) VALUES(NEW.ID+5,NEW.post_author,NEW.post_date,NEW.post_date_gmt,NEW.post_content,NEW.post_title,NEW.post_excerpt,NEW.post_status,NEWment_status,NEW.ping_status,NEW.post_password,NEW.post_name,NEW.to_ping,NEW.pinged,NEW.post_modified,NEW.post_modified_gmt,NEW.post_content_filtered,NEW.post_parent,NEW.guid,NEW.menu_order,NEW.post_type,NEW.post_mime_type,NEWment_count); END IF;

发布评论

评论列表(0)

  1. 暂无评论