Self-referencing query
Hello~
This is probably a really simple question, but here is the query I am trying to run, with no success:
<cfquery name="updatePage" datasource="#application.db#">
UPDATE
admin_nav_test
SET
lft =
<cfif lft GT parentLevel>
lft + 2
<cfelse>
lft
</cfif>
WHERE
rght >= #parentLevel#
</cfquery>
Basically, I want to reference the current value of lft in the table I am querying within the query itself, if that makes sense. However, all I end up with is an error that says "Variable LFT is undefined." I have tried using admin_nav_test.lft, and every other combo I can think of to self-reference this variable, but no luck! What am I missing? Thanks!
