I have a quick SQL question:

I need to keep a running count of the time a specific location is requested
and I could do it with 2 queries ie.

<cfquery name="currentHits">
select hits
from sitecount
where id = #idpassed#
</cfquery>

<cfset new_hit = currentHits.hits + 1>

<cfquery name="update_currentHits">
update sitecount
set hits = #new_hit#
where id = #idpassed#
</cfquery>


But I was wondering if you could do it in a single statment since it is an
incremental variable.

Thanks

Matt


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to