Report this

What is the reason for this report?

How run two or more SQL queries together in the same line command?

Posted on February 15, 2016
Nay

By Nay

Hello!

I want run multiple queries (sql) in the same line command to Update image URLs in my database of WordPress.

How I run that command connecting the comands of updates?

For example:

UPDATE wp_posts SET post_content = replace(post_content, ‘http://oldurl.com/image/image1.jpg’, http://newurl.com/image/image1.jpg’); UPDATE wp_posts SET post_content = replace(post_content, ‘http://oldurl.com/image/image2.jpg’, http://newurl.com/image/image2.jpg’); UPDATE wp_posts SET post_content = replace(post_content, ‘http://oldurl.com/image/image3.jpg’, http://newurl.com/image/image3.jpg’);

I am using nginx - Ubuntu 14.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.