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

Status
Not open for further replies.

Ashleyuk1984

Active Member
1,242
2010
304
1,010
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.
Back
Top