[SOLVED] Â Call a Sql function that returns a value |
2/9/2020 5:04:46 AM |
PHPRunner General questions | |
J
jacktonghk authorDevClub member
Hi, |
|
![]() |
Admin 2/9/2020 |
Show us your exact code and exact error message. |
J
|
jacktonghk authorDevClub member 2/10/2020 |
Show us your exact code and exact error message.
|
![]() |
Admin 2/10/2020 |
Is this your complete PHP code? Looks like error is happening somewhere else. |
J
|
jacktonghk authorDevClub member 2/11/2020 |
Is this your complete PHP code? Looks like error is happening somewhere else.
|
J
|
jacktonghk authorDevClub member 2/11/2020 |
Is this your complete PHP code? Looks like error is happening somewhere else.
|
J
|
jacktonghk authorDevClub member 2/11/2020 |
I have modified my SQL Server function to a Table-valued function as below and modified my event code to fetch the record. Then it works. I am wondering DB::Query does not support SQL Server's Scalar-valued functions. I haven't tested it with the SQL Server's aggregate functions. |
A
|
acpan 2/11/2020 |
[Okay, saw you fixed the probem, i will just leave the suggestions here for future reference.]
|
J
|
jacktonghk authorDevClub member 2/12/2020 |
[Okay, saw you fixed the probem, i will just leave the suggestions here for future reference.] The error line only shows a hint where the error is triggered, actual problem may be from other part that leads to the trigger. I will try to give some suggestions:
|
![]() |
Admin 2/12/2020 |
I can see two possible issues here:
if ($data[diff] <> 0)
if ($data["diff"] <> 0)
select dbo.fn_check_gl_voucher_diff(...) as diff |
J
|
jacktonghk authorDevClub member 2/13/2020 |
I can see two possible issues here:
if ($data[diff] <> 0)
if ($data["diff"] <> 0)
select dbo.fn_check_gl_voucher_diff(...) as diff
|