FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Prune stale users?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Prune stale users? [message #36286 is a reply to message #36285] Tue, 13 March 2007 15:57 Go to previous messageGo to previous message
Marticus   United States
Messages: 272
Registered: June 2002
Karma:
Senior Member
I managed to resolve the includes issue, but now I fail to understand why the following sql syntax is failing.

WHERE posted_msg_count=0

When I don't include that, it works. The following works. Now I need to add the deletions.

require_once("GLOBALS.php");
include_once($GLOBALS['DATA_DIR'] . "scripts/fudapi.inc.php");
fud_use('db.inc');
define('forum_debug', 1);

$query = "SELECT * FROM " . $GLOBALS['DBHOST_TBL_PREFIX']
            . "users ORDER BY join_date ASC";
$listing = _fud_simple_fetch_query(0, $query);
foreach ($listing as $user) {
    if (($user->posted_msg_count == 0) && ((time() - $user->join_date) >= 7257600) && ($user->id != 1)) {
        print "ID: " . $user->id . " ";
        print "Login: " . $user->login . " ";
        print "Joined: " . date('m/d/Y',$user->join_date) . " ";
        print "Posts: " . $user->posted_msg_count . " ";
        print "<br>\n";
    }
}

[Updated on: Tue, 13 March 2007 16:23]

Report message to a moderator

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon6.gif
Read Message
Previous Topic: Embedding audio via html
Next Topic: Problem sending e-mail from the forum
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 03:24:31 GMT 2024

Total time taken to generate the page: 0.04482 seconds