Changes between Version 62 and Version 63 of AdvancedApplicationDevelopment
- Timestamp:
- 08/31/24 02:08:58 (3 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AdvancedApplicationDevelopment
v62 v63 83 83 EXECUTE FUNCTION set_default_date_askes(); 84 84 }}} 85 \\ При внес на date_added во Products автоматски се пополнува денешниот датум. 86 {{{ 87 CREATE OR REPLACE FUNCTION set_date_added() 88 RETURNS TRIGGER AS $$ 89 BEGIN 90 -- Поставување на dateAdded на тековниот датум 91 NEW.dateAdded := CURRENT_DATE; 92 RETURN NEW; 93 END; 94 $$ LANGUAGE plpgsql; 95 96 CREATE TRIGGER before_insert_set_date_added 97 BEFORE INSERT ON products 98 FOR EACH ROW 99 EXECUTE FUNCTION set_date_added(); 100 }}}