Trigger to prevent update of specific columns and rows in Mysql -


i recentely posted question trigger able prevent update of specific tables, asked in comments solution prevent update of speficic columns , rows. managed write trigger prevents update of specific columns, still cant figure how limit specific number of rows. thought should open new question in order give solution ones need , have reply on other problem, meaning limit trigger specific # of rows. following trigger works columns:

delimiter ;;  create trigger my_trigger before update on test_table each row if (new.price != old.price or new.name != old.name) update update_of_table1_is_not_allowed set value='update not allowed!'; end if;;  delimiter ; 

is there way choose # of rows hit trigger? lets want select interval of rows or specific rows numbers... hint? lot.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -