从表单提取值并发送到数据库服务如何将参数(过滤器) [英] Extract value from form and send to database service how a parameter (filter)
问题描述
在我的配置中,我尝试了下一个命令(BD mysql):
SELECT user,name,lastname FROM Cordloc
where user =< sql:param type =xs:stringselect =/ form / section-1 / usuario/>
这个数据库服务可以下降,但是当我包含这个句子时其中user =< sql:param type =xs:stringselect =/ form / section-1 / usuario/>
,
这不起作用。 p>
我尝试使用show en drowdown name用户,但使用用户登录名orbeon进行过滤(在表中的值为orbeon)。
请帮助我。
$ b
非常感谢。
在查询中不能使用XPath表达式,例如 / form / section-1 / usuario
。相反, select
属性必须的值留空(如 1.设置服务参数)。
相反,您将该值从该操作馈入服务。在 Actions Editor 中的 Set Database Service Parameters 下,您可以说来自给定字段的值应该用于SQL查询的参数。
In my configuration, I try the next comand (BD mysql):
SELECT user, name, lastname FROM Cordloc
where user=<sql:param type="xs:string" select="/form/section-1/usuario"/>
This database service is conect to drowpdown, but when I incluye the sentence "where user=<sql:param type="xs:string" select="/form/section-1/usuario"/>"
,
this it's not working.
I try the show en drowdown name user, but filter with user login orbeon (in the table is same value "orbeon").
Please, can your help me with that.
Many thanks.
You can't use an XPath expression, such as /form/section-1/usuario
, in the query. Instead, the value of the select
attribute must be left empty (as mentioned in 1. Set a service parameter).
Instead, you "feed" the value to the service from the action. In the Actions Editor, under Set Database Service Parameters, you can say that the value from a given field should be used for a parameter of your SQL query.
这篇关于从表单提取值并发送到数据库服务如何将参数(过滤器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!