Sponsored Content
The Lounge What is on Your Mind? Purge of Inactive Users with Zero Posts and Other Anti-spam Measures Post 303023536 by Neo on Wednesday 19th of September 2018 03:17:12 AM
Old 09-19-2018
And on top of that, just deleted all "homepage" links from profile pages of member who have not been active on the site since 1 Sept 2017 (over a year ago) regardless of the number of posts they had:

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

 

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
MAXDB_INFO(3)								 1							     MAXDB_INFO(3)

maxdb_info - Retrieves information about the most recently executed query

       Procedural style

SYNOPSIS
string maxdb_info (resource $link) DESCRIPTION
Object oriented style string$maxdb->info () The maxdb_info(3) function returns a string providing information about the last query executed. The nature of this string is provided below: Possible maxdb_info return values +---------------------------------------+----------------------------------------------+ | Query type | | | | | | | Example result string | | | | +---------------------------------------+----------------------------------------------+ | INSERT INTO...SELECT... | | | | | | | Records: 100 Duplicates: 0 Warnings: 0 | | | | |INSERT INTO...VALUES (...),(...),(...) | | | | | | | Records: 3 Duplicates: 0 Warnings: 0 | | | | | LOAD DATA INFILE ... | | | | | | | Records: 1 Deleted: 0 Skipped: 0 Warnings: 0 | | | | | ALTER TABLE ... | | | | | | | Records: 3 Duplicates: 0 Warnings: 0 | | | | | UPDATE ... | | | | | | | Rows matched: 40 Changed: 40 Warnings: 0 | | | | +---------------------------------------+----------------------------------------------+ Note Queries which do not fall into one of the above formats are not supported. In these situations, maxdb_info(3) will return an empty string. RETURN VALUES
A character string representing additional information about the most recently executed query. EXAMPLES
Example #1 Object oriented style <?php $maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB"); /* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s ", maxdb_connect_error()); exit(); } $maxdb->query("CREATE TABLE temp.t1 LIKE hotel.city"); /* INSERT INTO .. SELECT */ $maxdb->query("INSERT INTO temp.t1 SELECT * FROM hotel.city"); printf("%s ", $maxdb->info); /* close connection */ $maxdb->close(); ?> Example #2 Procedural style <?php $link = maxdb_connect("localhost", "MONA", "RED", "DEMODB"); /* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s ", maxdb_connect_error()); exit(); } maxdb_query($link, "CREATE TABLE temp.t1 LIKE hotel.city"); /* INSERT INTO .. SELECT */ maxdb_query($link, "INSERT INTO temp.t1 SELECT * FROM hotel.city"); printf("%s ", maxdb_info($link)); /* close connection */ maxdb_close($link); ?> The above example will output something similar to: Records: 25 Duplicates: 0 Warnings: 0 SEE ALSO
maxdb_affected_rows(3), maxdb_warning_count(3), maxdb_num_rows(3). PHP Documentation Group MAXDB_INFO(3)
All times are GMT -4. The time now is 10:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy