AnsweredAssumed Answered

$GLOBALS["db"]->query()  not working in before save logic hook

Question asked by Anand Chitikela on Nov 27, 2015
Latest reply on Nov 30, 2015 by Ajay Kumar

Hi

 

  I want to execute an sql statement in the before save logic hook.

 

I have tried

$GLOBALS['db']->query("UPDATE users SET description='test' WHERE id='27283e5a-8f34-b846-367a-561fbbb4cb54'");

 

$db = DBManagerFactory::getInstance();

$res = $db->query("UPDATE users SET description='test' WHERE id='27283e5a-8f34-b846-367a-561fbbb4cb54'");

 

But it is not working.Shijin Krishna@

Outcomes