You do not have permission to call “UrlFetchApp.fetch”

onEdit is invoked by a Simple Trigger when a user changes a value in a spreadsheet. However, simple triggers cannot access services that require authorization, such as UrlFetchApp.fetch. See the Google Apps Script guide What you can do is to simply rename the function onEdit to something else, such as atEdit, so as to remove … Read more

How to program a MySQL trigger to insert row into another table?

drop table if exists comments; create table comments ( comment_id int unsigned not null auto_increment primary key, user_id int unsigned not null ) engine=innodb; drop table if exists activities; create table activities ( activity_id int unsigned not null auto_increment primary key, comment_id int unsigned not null, user_id int unsigned not null ) engine=innodb; delimiter # … Read more

FOR EACH STATEMENT trigger example

OLD and NEW are null or not defined in a statement-level trigger. Per documentation: NEW Data type RECORD; variable holding the new database row for INSERT/UPDATE operations in row-level triggers. This variable is null in statement-level triggers and for DELETE operations. OLD Data type RECORD; variable holding the old database row for UPDATE/DELETE operations in … Read more

MySQL error 1436: Thread stack overrun, with simple query

1436 – Thread stack overrun: 6136 bytes used of a 131072 byte stack, and 128000 bytes needed. The error 1436 corresponds to ER_STACK_OVERRUN_NEED_MORE in the mysql 5.1 code : malff@linux-8edv:include> pwd /home/malff/BZR_TREE/mysql-5.1/include malff@linux-8edv:include> grep 1436 mysqld_error.h #define ER_STACK_OVERRUN_NEED_MORE 1436 The code printing the error seen is in sql/sql_parse.cc, function check_stack_overrun() : bool check_stack_overrun(THD *thd, long … Read more

Using MySQL triggers to log all table changes to a secondary table

The insert syntax is INSERT INTO table (columns_list) VALUES (values_list) so your insert would look something like this (i’m not a MySQL expert but you can fit the query): INSERT INTO data_tracking (`data_id` , `field` , `old_value` , `new_value` , `modified` ) VALUES (NEW.data_id, ‘field1’, OLD.field, NEW.field, CURRENT_DATETIME()); And repeat it for variation on field2 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)