Page 1 of 1

After Row_Inserted run multiple queries

Posted: Mon Aug 26, 2013 1:41 am
by sal1150

I tray to run these functions :-

function Row_Inserted($rsold, &$rsnew) {
  return ew_ExecuteScalar($this->sql_payroll_r ());
  return ew_ExecuteScalar($this->sql_payroll_n ());
}

But I found the result of first one only.
How can I run both in same time


Re: After Row_Inserted run multiple queries

Posted: Mon Aug 26, 2013 4:10 am
by sal1150

Sorry I found the solution, 'return' must be removed so

function Row_Inserted($rsold, &$rsnew) {
ew_ExecuteScalar($this->sql_payroll_r ());
ew_ExecuteScalar($this->sql_payroll_n ());
}


Re: After Row_Inserted run multiple queries

Posted: Mon Aug 26, 2013 11:55 am
by Webmaster

To get a value from ew_ExecuteScalar, the correct syntax should be:

$val = ew_ExecuteScalar("<SQL>");