SQL statement after_update hook

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
ohinrichs
Posts: 7
Joined: 2013-11-21 10:22

SQL statement after_update hook

Post by ohinrichs » 2014-07-02 11:51

I want to execute this sql statement after update an item:

Code: Select all

UPDATE `geraete`
SET `geraete`.`rueckl`="1"
WHERE `geraete`.`lieferdat2` IS NOT NULL;
I have added the statement as an "Advanced lookup option" - but it don't work. (with MySQL Workbench everything works fine)

How can i use the statement with a hook? (after_update)

Thanks in advance.

ohinrichs
Posts: 7
Joined: 2013-11-21 10:22

Re: SQL statement after_update hook

Post by ohinrichs » 2014-07-03 08:55

Problem (and others) solved with help from Uday Vatturi.

Code: Select all

function geraete_after_update($data, $memberInfo, &$args){
	
	$setRueckl=sqlValue("UPDATE `geraete` SET `geraete`.`rueckl`='1'   WHERE `geraete`.`lieferdat2` IS NOT NULL");
		
return TRUE;

Post Reply