Forums

Join
bbPress Support ForumsPluginsBest way to iterate through every user?

Info

Tags

Best way to iterate through every user?

  1. $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?

  2. You must log in to post.