Skip to:
Content
Pages
Categories
Search
Top
Bottom

Best way to iterate through every user?


  • Ben L.
    Member

    @nightgunner5

    $warnings = $bbdb->get_results("SELECT user_id, meta_value FROM $bbdb->usermeta WHERE meta_key='bbmodsuite_warnings'");

    Okay, so now I have all of the warnings from every user with them. That was easy, just one query. However, I don’t know any good way to go back to the database, once I loop through them all, since I will need to delete some of the usermeta entries, update the others, and update a second set of usermeta keys designed to lower database traffic. Thank goodness this is only on cron.

    How do I update hundreds (or even thousands) of database entries all at once?

You must be logged in to reply to this topic.