Home > CMS Tutorial > DEDECMS > body text

How dede adds the field father to dede_sys_enum

藏色散人
Release: 2019-12-19 10:00:28
Original
2475 people have browsed it

How dede adds the field father to dede_sys_enum

dedeHow to add the field father to dede_sys_enum?

dede provides a linkage model, corresponding to the database table dede_sys_enum, add A parent node field. Provide automatic update of triggers. There is an example below. You can refer to it.

Recommended learning: 梦Weavercms

Things:

dede provides Linkage model, corresponding to the database table dede_sys_enum, adds a parent node field. Provides automatic update of triggers.

Solution:

The trigger modifies the value of the father field

The code is as follows:

DELIMITER $$ 
CREATE TRIGGER `dede_sys_enum_AINS` 
BEFORE INSERT ON dede_sys_enum 
FOR EACH ROW 
BEGIN 
SET new.father=REPLACE(new.evalue,new.evalue,FLOOR(new.evalue/500)*500); 
end
Copy after login

The above is the detailed content of How dede adds the field father to dede_sys_enum. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template