There is a table "vizits", in it there are fields date and weeks. Want to make a trigger? so that when added to the table, the weeks field will calculate the week number from the date field:
update vizits set weeks = weekofyear(date)
Tell me how to do this, never did. Tried on the manual, does not roll:
CREATE TRIGGER `vizits`.`after_insert_date` AFTER INSERT ON `vizits` FOR EACH ROW BEGIN update vizits set weeks = weekofyear(date); END