vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Remove Orphan Posts by deleted users (https://vborg.vbsupport.ru/showthread.php?t=179641)

ovnnet 05-18-2008 12:38 PM

Remove Orphan Posts by deleted users
 
How can i removes all posts that belong to users who no longer exist? Because i'm using some mods, if in threads which have post by n/a user, i will get error.

Thank you,

King Kovifor 05-18-2008 12:48 PM

Do these posts still show up as their username? Or is it just "guest"?

ovnnet 05-18-2008 01:29 PM

still show up with their name. but them dont have title, status, profile info and Posts: n/a

nexialys 05-18-2008 01:31 PM

this is how the system behave actually, they never show like "guest" like King ask... Guests have usernames but no identification...

if you want to delete these posts, you will have to do them manually...

King Kovifor 05-18-2008 01:33 PM

nex,

The old username is still stored within the database I believe. Which would mean a query would be able to mass remove these threads / posts.

ovnnet 05-18-2008 01:46 PM

Can you tell me how to do it, King?

King Kovifor 05-18-2008 01:54 PM

[sql]DELETE FROM `post` WHERE `username`='username_here';[/sql]

Just add your table prefix to 'post' and change 'username_here' to the username. Also, you may want to run Maintenance -> Update Counters -> Remove Orphan Posts.

ovnnet 05-18-2008 02:00 PM

I'm sadly to say: It's impossible. Not only one user with many post, add my case, many users with many posts. If i know there names so i think delete manually is better. Have any way to do it in my case? thank you.

Paul M 05-18-2008 02:37 PM

DELETE FROM post WHERE userid = 0 will do it, but be very sure you want to do this, and make sure you backup the post table first. Sounds to me more like you should fix the mod, not be making mass deletions from your post table.


All times are GMT. The time now is 11:09 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00980 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete