- Posts: 9
COMMUNITY FORUM
update params of item based upon params of another
- dotted i
-
Topic Author
- Offline
- New Member
Less
More
10 years 9 months ago #130520
by dotted i
update params of item based upon params of another was created by dotted i
I am trying to synchronize the params of a category based upon the params of an item that is the model.
This does not work, is not valid mysql:
Item ID 300 is the role model for params. I want to first test it by updating the params of a single item, then if it works, go for the category, something like:
What is the correct mysql syntax to make this work?
This does not work, is not valid mysql:
update p3h0i_k2_items set params = (select params from p3h0i_k2_items where id = 300) where id = 278;
Item ID 300 is the role model for params. I want to first test it by updating the params of a single item, then if it works, go for the category, something like:
update p3h0i_k2_items set params = (select params from p3h0i_k2_items where id = 300) where catid = 100;
What is the correct mysql syntax to make this work?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 9 months ago #130521
by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: update params of item based upon params of another
I do not think this is the optimal solution, quite the contrary actually.
Create a new category called eg: Setup Category, and then apply all the correct settings.
Now set all the categories you want to edit to inherit all their values from the setup category.
Create a new category called eg: Setup Category, and then apply all the correct settings.
Now set all the categories you want to edit to inherit all their values from the setup category.
Please Log in or Create an account to join the conversation.
- dotted i
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 9
10 years 9 months ago #130522
by dotted i
Replied by dotted i on topic Re: update params of item based upon params of another
That will not work. The content administrators have been customizing the changes to individual items which overrides the category settings.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 9 months ago - 10 years 9 months ago #130523
by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: update params of item based upon params of another
The default params are:
Try setting all the items params row to this.
Be sure to backup first.
{"catItemTitle":"","catItemTitleLinked":"","catItemFeaturedNotice":"","catItemAuthor":"","catItemDateCreated":"","catItemRating":"","catItemImage":"","catItemIntroText":"","catItemExtraFields":"","catItemHits":"","catItemCategory":"","catItemTags":"","catItemAttachments":"","catItemAttachmentsCounter":"","catItemVideo":"","catItemVideoWidth":"","catItemVideoHeight":"","catItemAudioWidth":"","catItemAudioHeight":"","catItemVideoAutoPlay":"","catItemImageGallery":"","catItemDateModified":"","catItemReadMore":"","catItemCommentsAnchor":"","catItemK2Plugins":"","itemDateCreated":"","itemTitle":"","itemFeaturedNotice":"","itemAuthor":"","itemFontResizer":"","itemPrintButton":"","itemEmailButton":"","itemSocialButton":"","itemVideoAnchor":"","itemImageGalleryAnchor":"","itemCommentsAnchor":"","itemRating":"","itemImage":"","itemImgSize":"","itemImageMainCaption":"","itemImageMainCredits":"","itemIntroText":"","itemFullText":"","itemExtraFields":"","itemDateModified":"","itemHits":"","itemCategory":"","itemTags":"","itemAttachments":"","itemAttachmentsCounter":"","itemVideo":"","itemVideoWidth":"","itemVideoHeight":"","itemAudioWidth":"","itemAudioHeight":"","itemVideoAutoPlay":"","itemVideoCaption":"","itemVideoCredits":"","itemImageGallery":"","itemNavigation":"","itemComments":"","itemTwitterButton":"","itemFacebookButton":"","itemGooglePlusOneButton":"","itemAuthorBlock":"","itemAuthorImage":"","itemAuthorDescription":"","itemAuthorURL":"","itemAuthorEmail":"","itemAuthorLatest":"","itemAuthorLatestLimit":"","itemRelated":"","itemRelatedLimit":"","itemRelatedTitle":"","itemRelatedCategory":"","itemRelatedImageSize":"","itemRelatedIntrotext":"","itemRelatedFulltext":"","itemRelatedAuthor":"","itemRelatedMedia":"","itemRelatedImageGallery":"","itemK2Plugins":""}
Try setting all the items params row to this.
Be sure to backup first.
Please Log in or Create an account to join the conversation.