retriving data in coldfusion and putting it to textboxes
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.
精彩评论