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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This should be simple........ 1

Status
Not open for further replies.

cpod

Programmer
Joined
Sep 8, 2001
Messages
4
Location
US
I realize I am just starting to learn but it seems like this should be simple:

I'm just trying to access the maximum value for "ID" and increment by one:

<cfquery datasource=&quot;eci&quot; name=&quot;maxquery&quot;>
select max(ID) as mxid from visitors
</cfquery>

<cfset maxid = mxid +1>

I know the value is there, I can output it by:

<cfoutput query=&quot;maxquery&quot;>
testing #mxid#
</cfoutput>

but if I try to do anything else with it I get a &quot;unable to determine the value of the parameter&quot; error.

I'm sure it's something simple that I am unable to see.

Thank you for any help you are able to give.
 
My suggestion would be to enclose your CFSET in CFOUTPUT tags and use # signs.
Code:
<cfoutput>
    <cfset maxid = #maxquery.mxid# + 1>
</cfoutput>
Calista :-X
Jedi Knight,
Champion of the Force
 
That did it.

Thank you so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top