Joel,

Put the column first in a math operation:


        UPDATE Statistic_Results#YearMonth#
        SET Raw_Hits =  Raw_Hits + 1,
        Unique_Hits = Unique_Hits + 1
        WHERE Domain_ID = '#DomainNameID#'
        AND Daily_Date = '#TodayDate#'


Assuming they are both int or numeric types - this will work.

-mk



-----Original Message-----
From: Joel Blanchette [mailto:cftalk@;pointofimpact.com]
Sent: Tuesday, November 05, 2002 2:09 PM
To: CF-Talk
Subject: SQL Statement


I have this VB SQL Statement and I need to change it to cf mysql

<CFQUERY NAME="SRUpdate" DATASOURCE="DomainDefault" USERNAME="joel"
PASSWORD="klrtl">
        UPDATE Statistic_Results#YearMonth#
        SET Raw_Hits = 1 + Raw_Hits,
        Unique_Hits = 1 + Unique_Hits
        WHERE Domain_ID = '#DomainNameID#'
        AND Daily_Date = '#TodayDate#'
</CFQUERY>

The problem lies when I do the column + 1.  Is there an easy way of
doing this without doing a new cfquery?



==============================
Joel Blanchette
IT and System Specialist
Point of Impact Technologies Inc.
Tel: (204) 989-0013
Email: [EMAIL PROTECTED]
==============================


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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