I need to update the details of a few thousand accounts and I can't do it with pure MySQL, I need php too. With all the loops that's probably around 100k mysql queries. I chose to do it via a button that makes an ajax request and when testing i locally the request is still pending after hours. I know that a single loop works as intended. If I do the same thing on the server will it keep executing the queries after I go offline? Will too many queries have effect on the website's users? Tried shortening the process by having the loop just add to a query string every time it needs to update the database and execute it all at once when it's all over, but
$wpdb->query( $wpdb->prepare( $query_string, $value_parameters_array ) );
doesn't seem to do anything when testing with a single loop.