Home > Article > CMS Tutorial > 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
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!