This content has been marked as final. Show 3 replies
Check out the code below.
how to "loop" it depends on what "process" you intend to "do"...
if all "processes" are same except for each uses a different tabshow
value, you can loop it (e.g. looping from=149 to=144 using step="-1" in
your loop and <cfbreak> to break out of if a query inside the loop
returns any records); if not... maybe a generic code like below can work
select test from testtable where tabshow = 149
<cfif getqry1.recordcount gt 0>
do your process 1
select test from testtable where tabshow = 148
<cfif getqry2.recordcount gt 0>
do your process 2
and so on...
whether this works or not depends a lot on other code in your page, i.e.
<cfabort> will stop ALL processing, including any cfml/html code outside
where tabshow between 144 and 149
order by tabshow desc
Think you can take it from there?