Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - batch delete users
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

batch delete users

 Post Reply Post Reply
Author
reffael1 View Drop Down
Newbie
Newbie


Joined: 27 August 2002
Location: Colombia
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote reffael1 Quote  Post ReplyReply Direct Link To This Post Topic: batch delete users
    Posted: 17 February 2003 at 4:53am

i have many non active registered users in my forum and i'd like to delete them from the database.

i tried this sql sentence
"DELETE FROM tblAuthor WHERE ((tblAuthor.No_of_posts)<5); "

but because of the constrains i got error message, how can i remove the constrains or bypass them? 

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2003 at 7:30am

You are better off just deleting those people who have never posted.

If you remove the relationships between the tables to force the deletion of poeple who have posted less than 5 posts you will find that any topic that someone has posted in that you have delted the account of won't be viewable and you will end up with a forum that crashes all over the place.

Back to Top
reffael1 View Drop Down
Newbie
Newbie


Joined: 27 August 2002
Location: Colombia
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote reffael1 Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2003 at 7:03am
but if i add to the sql sentence, condition to delete only if the user didn't send message in the last month, and i delete all the emessages older than one month this should work, am i right or am i wrong?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2003 at 1:12pm
No, you can not delete any member that has made a post, or the forum simply won't run.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.