Sponsored Content
The Lounge What is on Your Mind? Purge of Inactive Users with Zero Posts and Other Anti-spam Measures Post 303023537 by Neo on Wednesday 19th of September 2018 03:23:05 AM
Old 09-19-2018
And just deleted any "homepage" links from all users with zero posts who have not been active since 1 September 2018:

Code:
mysql> update user set homepage=''  where homepage!='' and posts=0 and lastactivity < 1535760000;
Query OK, 153 rows affected (0.21 sec)
Rows matched: 153  Changed: 153  Warnings: 0

So, that should get rid of most of the prior "register and just add a link" spammers.
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to logout inactive users????

I would like to automatically logout from the system inactive users depending on their functions. For example there are users that I would like to logout after 15 minutes of inactivity, but there are others that I would like to logout after 30 minutes of inactivity. It's possible to do this??? (6 Replies)
Discussion started by: rrivas
6 Replies

2. UNIX for Dummies Questions & Answers

List all inactive users who has not logged on since last 90 days

Hi, Can I get a script to list out all the users, who has not logged on since last 90 days. Last command in not working due due to /var/adm/wtmpx is more than 2 GB. Thanks in advance. Regards, Roni (10 Replies)
Discussion started by: manasranjanpand
10 Replies

3. Solaris

List all inactive users who has not logged on since last 90 days

I need actuall script which List all inactive users who has not logged on since last 90 days Thanks in advance. Di! (17 Replies)
Discussion started by: haridham
17 Replies

4. Shell Programming and Scripting

Deleting Inactive Solaris users

Hello, I want to do a search for users on my solaris boxes that have been inactive for a defined number of days and then delete them. Any ideas how to determine or calculate the number of days (possibly using the /var/adm/wtmpx file) from the user's last login to the current date of search. ... (0 Replies)
Discussion started by: prince2010
0 Replies
SYBASE_AFFECTED_ROWS(3) 												   SYBASE_AFFECTED_ROWS(3)

sybase_affected_rows - Gets number of affected rows in last query

SYNOPSIS
int sybase_affected_rows ([resource $link_identifier]) DESCRIPTION
sybase_affected_rows(3) returns the number of rows affected by the last INSERT, UPDATE or DELETE query on the server associated with the specified link identifier. This command is not effective for SELECT statements, only on statements which modify records. To retrieve the number of rows returned from a SELECT, use sybase_num_rows(3). PARAMETERS
o $link_identifier - If the link identifier isn't specified, the last opened link is assumed. RETURN VALUES
Returns the number of affected rows, as an integer. EXAMPLES
Example #1 Delete-Query <?php /* connect to database */ sybase_connect('SYBASE', '', '') or die("Could not connect"); sybase_select_db("db"); sybase_query("DELETE FROM sometable WHERE id < 10"); printf("Records deleted: %d ", sybase_affected_rows()); ?> The above example will output: Records deleted: 10 SEE ALSO
sybase_num_rows(3). PHP Documentation Group SYBASE_AFFECTED_ROWS(3)
All times are GMT -4. The time now is 09:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy