Skip to content
WJunction - Webmaster Forum

How do you run a SQL query on a certain database without "selecting" it first?

Status
Not open for further replies.
How do you run a SQL query on a certain database without "selecting" that database first...
All I want to do is go straight to SQL and perform the query.
Server has multiple databases...

This is the query that I'm trying to perform.

Code:
UPDATE wp_posts SET post_author=1 WHERE post_author=0

I've tried:

Code:
Select [I]DatabaseName [/I]UPDATE wp_posts SET post_author=1 WHERE post_author=0

But that didn't work?
 

2 comments

Status
Not open for further replies.

About the author

A
Active Member · Joined
1,242
Messages
304
Reactions
83
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom