please do describe your attempted logic in plain English -
not many
people have the time to go through all that code of yours and
try to
FIGURE OUT your logic and then figure out what's wrong with
it... well,
at least i don;t have that much time...
Seriously neither is posting 100+ lines of code with a note
that "its not working properly". How do you expect people to know
what the code IS suppposed to be doing unless you give a
description of the desired results and the problem? Put a little
effort into it.
It fixed..
<cfset q = snum1 - 1>
<cfif s1.msnum eq 2>
<cfquery name="upt2" dataSource="#FormVector#">
update genbid_login1 set snum = snum -1
where status = 'A' and role = 'LT'
</cfquery>
<cfelseif q lt s1.mxsnum and snum1 gte 1>
<cfquery name="upt2" dataSource="#FormVector#">
update genbid_login1 set snum = snum -1
where snum > #q# and status = 'A' and role = 'LT'
</cfquery>
<cfelseif snum1 eq s1.mxsnum>
<cfquery name="upt2" dataSource="#FormVector#">
update genbid_login1 set snum = snum -1
where snum = #s1.mxsnum# and status = 'A' and role = 'LT'
</cfquery>