+ Reply to Thread
Results 1 to 5 of 5

Thread: Bulk Remove Users Without Listings

Hybrid View

  1. #1
    Senior Member
    Join Date
    Mar 2019
    Location
    Philadelphia, PA, USA
    Posts
    112

    Bulk Remove Users Without Listings

    Hi,

    How would I go about bulk deleting using accounts that do not have any listings? It would have to be segmented by account type as I do not want to delete any admin accounts.

    Thanks,
    Jason

  2. #2
    Why delete account without listings?

  3. #3
    Senior Member
    Join Date
    Mar 2019
    Location
    Philadelphia, PA, USA
    Posts
    112
    I have a subset of listings and users that are received via an xml feed that is updated daily and at any given time the 'find a dealer' page can have 1000's of user accounts. It's cleaner to only display dealers with vehicles, plus it helps the database not be as cluttered.

  4. #4
    You can use SQL Query to do that,

    For example:
    DELETE FROM {your_database_prefix}_accounts WHERE `Type` = 'dealer' AND `Listings_count` = 0;

    This Query will delete all users with type: "dealer" and Listings_count equals 0

    Dont forget backup your database before

  5. #5
    Senior Member
    Join Date
    Mar 2019
    Location
    Philadelphia, PA, USA
    Posts
    112
    Thanks Alex!

+ Reply to Thread