更新时间:2023-12-01 10:44:22
这是4个不同的问题:
- 如何对我的SQL基础做一个请求。
- 如何获得请求的结果。
- 如何添加2个值从结果。
- 如何在TextBox中放置一个值。
哪一个对你有问题?
你做了什么?
如果什么也没做,你的分析方法有问题吗?
SELECT P_id,P_price,P_interest,P_barcode,(P_price + P_interest) as T_price tbproduct
然后你可以设置T_price val即文本框文本
I have a table named tbproduct (P_id,P_price,P_interest,P_barcode) i want to add the values from P_price and P_interest and display it in a textbox for example if P_price is 100 and P_interest is 20 then the textbox should display 120
i have no idea how to do that
thank you!
That is 4 different questions:
- How to do a request to my SQL base.
- How to get the result of the request.
- How to add 2 value from the result.
- How to put a value in TextBox.
Which one is a problem for you ?
What have you done ?
If done nothing, do you have a problem with your analyse method ?
SELECT P_id,P_price,P_interest,P_barcode, ( P_price+ P_interest) as T_price tbproduct
then you can set T_price value as textbox text