hi all,

just looking at this query and thought there must be a better way of writing 
it. I'm probabley missing something obvious, here's the code:

<cfquery name="editAllPages" datasource="#REQUEST.theDatabase#">
UPDATE  corpPages
SET             priority = priority - 1
WHERE   active = '1'
AND             subpage = (SELECT       subpage FROM corppages  pageID = 
<cfqueryparam value="#ARGUMENTS.pageID#" cfsqltype="cf_sql_integer" />)
AND             isFloat = '0'
AND             navlocation = (SELECT   navlocation FROM corppages      pageID 
= <cfqueryparam value="#ARGUMENTS.pageID#" cfsqltype="cf_sql_integer" />)
AND             siteLocation = (SELECT  sitelocation FROM corppages     pageID 
= <cfqueryparam value="#ARGUMENTS.pageID#" cfsqltype="cf_sql_integer" />)
AND             priority > (SELECT      priority FROM corppages pageID = 
<cfqueryparam value="#ARGUMENTS.pageID#" cfsqltype="cf_sql_integer" />)
</cfquery>                              

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259381
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to