Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending getMessage() method with coldfusion Component

Status
Not open for further replies.

wrighterb

Programmer
Feb 20, 2007
80
US
<cfcomponent>
<cffunction name="getMessage" access="remote" returntype="XML">
<cfargument name="firstname" type="string" required="yes">
<cfargument name="lastname" type="string" required="yes">
<cfquery name="result" datasource="#request.dsn#">
SELECT ID, Firstname, LastName
FROM Loger
Where Firstname = '#ARGUMENTS.firstname#' and Lastname = '#ARGUMENTS.lastname#'
</cfquery>
<cfxml variable="returnXML">
<?xml version="1.0" encoding="iso-8859-1"?>
<Users>
<cfoutput query="result">
<UserID id="#ID#">
<firstname>#firstname#</firstname>
<lastname>#lastname#</lastname>
</UserID>
</cfoutput>
</Users>
</cfxml>
</xml>
<cfreturn returnXML>
</cffunction>
</cfcomponent>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top