开发者

retriving data in coldfusion and putting it to textboxes

开发者 https://www.devze.com 2023-02-15 10:50 出处:网络
can anyone suggest a simple code to retrieve data from a table in MSQL5 and add it to particular text box开发者_如何学Pythones in coldfusion?You\'ll need to be more specific than that to get any decen

can anyone suggest a simple code to retrieve data from a table in MSQL5 and add it to particular text box开发者_如何学Pythones in coldfusion?


You'll need to be more specific than that to get any decent help. It basically goes like this though:

<cfquery name="myRecordset" datasource="myDataSource">
SELECT MyField FROM MyTable
</cfquery>

That gets your recordset. Now output the field somewhere:

<cfoutput>#myRecordset.myField#</cfoutput>

Or put it into a text field:

<cfoutput><input type="text" name="myInput" value="#myRecordset.myField#" /></cfoutput>

Or if you're using <cfform> you can do this:

<cfinput type="text" name="myInput" value="#myRecordset.myField#" />

Hopefully that gets you what you need, otherwise please be more specific with your question.

0

精彩评论

暂无评论...
验证码 换一张
取 消