0

i have just start with phpmyadmin, i want to auto fill logs that insert/update in database. i use trigger to do this but it didnt work. how i do next?

here is my code

[table]

1

CREATE DEFINER=`root`@`localhost` TRIGGER `auto_insert_user` 
BEFORE INSERT ON `author` FOR EACH ROW 
set @updateby:=CURRENT_USER

update i try to replace current_user by user() but it didnt work

StupidCat
  • 19
  • 3
  • Please read not only the accepted answer, it may be easier to do this using an expression as default value, if your mysql version supports it. – Shadow Jul 09 '21 at 18:07
  • @Shadow i watch tutorial about it and still cant fint default value for auto fill ```current_user``` . can you show me or give me a key work to find. – StupidCat Jul 09 '21 at 18:41
  • I already gave you a link. – Shadow Jul 09 '21 at 19:36

0 Answers0