Queries on appgini 5.81

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
Anton Mats
Posts: 5
Joined: 2017-08-26 15:40

Queries on appgini 5.81

Post by Anton Mats » 2019-11-04 13:06

Hi guys,
I need to understand something, using new "calculated field" function I tried to write this query for calculated field "salesTax":
SELECT ((`order_details`.`UnitPrice` * `order_details`.`Quantity`) *(`order_details`.`tax`/100)) FROM `order_details`
WHERE `order_details`.`odID`='%ID%'
It didn't works because `order_details`.`tax` come from other table (if I use a number instead field works fine).
In the hooks we were use something like that:
$taxSales = sqlValue(
"SELECT taxSales FROM products where ID='{$data['taxSales']}'"
);
How can we use that "sqlValue" in the previous query?
Thanks :roll: :roll:

User avatar
ronwill
Veteran Member
Posts: 121
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA

Re: Queries on appgini 5.81

Post by ronwill » 2019-11-05 00:14

Hi, Take a look at this topic, I think it covers what you are asking:
viewtopic.php?f=4&t=3288
Ron - AppGini Pro V 5.81 Rev 1094
Gloucestershire, UK

Post Reply