The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
is this possible?
So you could delete all users with 0 or 0-3 etc posts... i really need this.. Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Code:
<?
require("admin/config.php");
if($action=="") {
print("<form action=\"delete.php\" method=\"post\"><input type=\"hidden\" name=\"action\" value=\"deleteusers\"><p>Delete users with less than <input type=\"text\" size=\"5\" name=\"numberposts\"> posts.</p><p><input type=\"submit\" value=\"DELETE USERS\"></form>");
}
if($action==deleteusers) {
$query = mysql_query("DELETE from USER where POSTS < '$numberposts'");
print("You have successfully deleted all users with less than $numberposts posts.")
}
?>
HTH, or at least sets you in the right direction. -jim |
|
#3
|
|||
|
|||
|
thanks alot
|
|
#4
|
|||
|
|||
|
it doesn't work..
i pu it in the /admin directory and changed Code:
require("admin/config.php");
Code:
require("config.php");
|
|
#5
|
|||
|
|||
|
Jim, you forgot to connect to MySQL.
![]() [code]<?php require("global.php"); if($action=="") { print("<form action=\"delete.php\" method=\"post\"><input type=\"hidden\" name=\"action\" value=\"deleteusers\"><p>Delete users with less than <input type=\"text\" size=\"5\" name=\"numberposts\"> posts.</p><p><input type=\"submit\" value=\"DELETE USERS\"></form>"); } if($action==deleteusers) { $DB_site->query("DELETE FROM user WHERE posts < '$numberposts'"); print("You have successfully deleted all users with less than $numberposts posts.") } ?> |
|
#6
|
|||
|
|||
|
Quote:
-jim |
|
#7
|
|||
|
|||
|
can you please post the whole text for delete.php ?!
PLEASE!!!! |
|
#8
|
|||
|
|||
|
this is the code:
Code:
<?php
require("global.php");
if($action=="") {
print("<form action=\"delete.php\" method=\"post\"><input type=\"hidden\" name=\"action\" value=\"deleteusers\"><p>Delete users with less than <input type=\"text\" size=\"5\" name=\"numberposts\"> posts.</p><p><input type=\"submit\" value=\"DELETE USERS\"></form>");
}
if($action==deleteusers) {
$DB_site->query("DELETE FROM user WHERE posts < '$numberposts'");
print("You have successfully deleted all users with less than $numberposts posts.")
}
?>
|
|
#9
|
|||
|
|||
|
i've tried that but it doesn't work~~~~
|
|
#10
|
|||
|
|||
|
The quick way:
Just run this query in PHPMyAdmin: DELETE FROM user WHERE posts < 4 or whatever number of posts you like. |
![]() |
|
|