Zhimeng system add custom document attributes SQL statement tutorial

Source: Internet
Author: User

DEDECMS users may often feel that the official custom document attributes (recommended bit) are not enough. We will give you a detailed tutorial today.

 

The preceding figure shows the existing custom attributes in dedecms. The new version also adds a hotspot-focused attribute. The next step is to set a new custom document attribute for the SQL statement.

 

Based on the values (10, 'xinyi', 'new') in the preceding figure, we can explain that if there are nine of them, we can write 10. If the number is 11, 12 are written, and 'xinyi' is the keyword called in the template, and 'new' is selected in the add article.

The code is as follows: Copy code
Set ('C', 'H', 'P', 'F', 'S', 'J', 'A', 'B', 'P ', 'j', 'R', 'By', 'zz ', 'wh', 'zl', 'SS', 'zl', 'SS', 'F ', 'rdgz ')

Add all previously added attributes together and then append the keywords to be added this time.

An SQL statement is provided below

The code is as follows: Copy code

Insert into 'dede _ arcatt' (sortid, att, attname) values (10, 'rdgz', 'hot topics ');
Alter table 'dede _ Archives' modify 'flag' set ('C', 'H', 'P', 'F', 'S', 'J ', 'A', 'B', 'P', 'J', 'rdgz') default NULL;

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.