Page 1 of 1

SQL statement after_update hook

Posted: 2014-07-02 11:51
by ohinrichs
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.

Re: SQL statement after_update hook

Posted: 2014-07-03 08:55
by ohinrichs
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;