Hi,
Im trying to perform multiple upadtes to a row (I have one column already populated by a previous SQL command, but I want to populate the the rest of the fields at another time i.e. now
Currently, the only way I can do it is to enclose each update within a <CFQUERY> but this seems highly in-efficient i.e.:
<CFQUERY NAME = "SiteDataAdded" DATASOURCE = "Online" >
UPDATE UserSpecific
SET Title = '#Form.title#'
WHERE UserName = '#client.UserName#'
</CFQUERY>
<CFQUERY NAME = "SiteDataAdded" DATASOURCE = "Online" >
UPDATE UserSpecific
SET Heading = '#Form.Heading#'
WHERE UserName = '#client.UserName#'
</CFQUERY>
Im sure CF allows this to be done in one go??
What I'm trying to acheive is:
<CFQUERY NAME = "SiteDataAdded" DATASOURCE = "Online" >
UPDATE UserSpecific
SET
Section1Heading1 = '#Form.Section1Heading1#',
Section1Text1 = '#Form.Section1Text1#',
Section1Image1,= '#Form.Section1Image1#'
Section2Heading2, = '#Form.Section2Heading2#
Section2Text2 = '#Form.Section2Text2#'
Section2Image2 = '#Form.Section2Image2#'
WHERE UserName = '#client.UserName#'
</CFQUERY>
Is it a Brackets thing??
Thanks in advance
Sam
Im trying to perform multiple upadtes to a row (I have one column already populated by a previous SQL command, but I want to populate the the rest of the fields at another time i.e. now
Currently, the only way I can do it is to enclose each update within a <CFQUERY> but this seems highly in-efficient i.e.:
<CFQUERY NAME = "SiteDataAdded" DATASOURCE = "Online" >
UPDATE UserSpecific
SET Title = '#Form.title#'
WHERE UserName = '#client.UserName#'
</CFQUERY>
<CFQUERY NAME = "SiteDataAdded" DATASOURCE = "Online" >
UPDATE UserSpecific
SET Heading = '#Form.Heading#'
WHERE UserName = '#client.UserName#'
</CFQUERY>
Im sure CF allows this to be done in one go??
What I'm trying to acheive is:
<CFQUERY NAME = "SiteDataAdded" DATASOURCE = "Online" >
UPDATE UserSpecific
SET
Section1Heading1 = '#Form.Section1Heading1#',
Section1Text1 = '#Form.Section1Text1#',
Section1Image1,= '#Form.Section1Image1#'
Section2Heading2, = '#Form.Section2Heading2#
Section2Text2 = '#Form.Section2Text2#'
Section2Image2 = '#Form.Section2Image2#'
WHERE UserName = '#client.UserName#'
</CFQUERY>
Is it a Brackets thing??
Thanks in advance
Sam