ryan.frankel at gmail.com
Thu Nov 10 04:35:23 UTC 2011
As a follow up….is there an update_post_meta that can accept an object or array of keys and values to update more then one at a time?
On Nov 9, 2011, at 4:28 PM, Mike Schinkel wrote:
> Sounds like a very useful functionality. As you probably know many hooks can potentially run during wp_insert_post() so if you don't run those hooks you might run into trouble. Maybe you could create a trac ticket and then do a first pass on a future bulk insert for that would meet your needs but be a starting point for a potential future wp_insert_posts()?
> On Nov 9, 2011, at 4:12 PM, Ryan Frankel wrote:
>> Is there a function similar to wo_insert_post that can INSERT multiple posts into the db at the same time (i.e. not call INSERT over and over)? I have thousands of posts to insert into my db from an API pretty often and it looks like the long pole in the execution time is all of the inserts. It would be nice to have a function like wp_insert_posts for multiple post additions using multiple VALUEs that mysql supports. I realize I can probably modify the wp_insert_post code to do it but I figured I would ask so I don't reinvent the wheel.
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers