静态 ID 动态价格 Workcube - Coldfusion
我想设置静态id(产品)及其动态价格,如果id的价格发生变化,它将相应地显示,这就是我想要的,但我不知道变量,也不知道查询和输出的结构,我不知道不知道如何使用 Coldfusion 在 workcube 中定义特定产品的价格,这是我所了解的: 我知道下面的脚本是错误的^.^
<cfquery>
SELECT
PRICE_STANDART.PRICE PRICE
FROM
PRICE_STANDART
WHERE
PRICE_STANDART.PRODUCT_ID = #product_id#
</cfquery>
<cfset product_id = 612>
#TLFormat(price_standart)#
I want to set static id(product) and its dynamic price, if the id's price changes it will be displayed correspondingly, that's all I want, but I don't know the variable nor the structure of the queries and outputs, I don't know how to define the specific product's price in workcube using Coldfusion, this is as far as i've gone:
And i know that the script below is wrong ^.^
<cfquery>
SELECT
PRICE_STANDART.PRICE PRICE
FROM
PRICE_STANDART
WHERE
PRICE_STANDART.PRODUCT_ID = #product_id#
</cfquery>
<cfset product_id = 612>
#TLFormat(price_standart)#
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
认为以下内容适用于您的示例:
cfqueryparam,虽然不是必需的,但可以防止 SQL 注入攻击并用作 JDBC 驱动程序的绑定变量。
LSCurrenyFormat 将把数值格式化为货币。
TLFormat()
不是内置的 ColdFusion 函数。Think the following will work with your example:
cfqueryparam, while not necessary, prevents SQL injection attacks and serves as a bind variable with the JDBC driver.
LSCurrenyFormat will format a numeric value as currency.
TLFormat()
is a not a built-in ColdFusion function.