Part of the EllisLab Network
pMachine Pro has been replaced by ExpressionEngine, our full featured web publishing solution. Please consider upgrading.
You can download pMachine Pro here: Download pMachine Pro  |  Download Language Packs
   
 
Help with an SQL query needed
Posted: 30 January 2006 12:36 PM   [ Ignore ]  
Summer Student
Total Posts:  29
Joined  2003-06-14

I’m restructuting my site, and I nead tomove some data around my database.

I want to assign all the entries in the “news” weblog to the category “Latest”.  I tried:

Update pm_categories set category = "Latest" where weblog = "news"

but that didn’t seem to work; possibly because the weblog id is in another table apart from pm_categories.  Anybody able to point me to the right syntax?

Many thanks

Profile
 
 
Posted: 30 January 2006 03:16 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12273
Joined  2002-04-29

update pm_weblog set category = "1" where weblog="news"

Where 1 is your category id.

Backup your pm_weblog table before attempting this.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 233, on December 18, 2007 12:04 AM
Total Registered Members: 64518 Total Logged-in Users: 0
Total Topics: 81079 Total Anonymous Users: 0
Total Replies: 436321 Total Guests: 18
Total Posts: 517400    
Members ( View Memberlist )
Active Members: