well the alert will never equal the form.alert unless they are updating with
the same text. Perhaps remove the where clause and change your if statement
so perhaps:
<cfquery datasource="text">
UPDATE alert
<cfif isdefined("form.alert") and form.alert neq "">
SET alert = '#form.alert#'
<cfelse>
set alert = NULL
</cfif>
</cfquery>
HTH
Rob
On Thu, Dec 18, 2008 at 3:04 PM, Steve LaBadie <[email protected]>wrote:
> Is this correct? I am not getting any errors, but the updated text is
> not showing on the page.
>
> <cfquery datasource="text">
> UPDATE alert
> SET alert = '<cfif IsDefined("FORM.alert") AND #FORM.alert# NEQ "">'
> WHERE alert = '#FORM.alert#';
> <cfelse>
> NULL
> </cfif>
> </cfquery>
> <cflocation url="../../status1.cfm?msg=Alert+Title+added+successfully.">
> </cfif>
>
> Steve LaBadie, Web Manager
> East Stroudsburg University
> 200 Prospect St.
> East Stroudsburg, Pa 18301
> 570-422-3999
> http://www.esu.edu
> [email protected]
> -----Original Message-----
> From: Ravi Gehlot [mailto:[email protected]]
> Sent: Thursday, December 18, 2008 1:59 PM
> To: cf-talk
> Subject: Re: Simply Amin Panel
>
> Hello Steve,
>
> You want to update and not insert if you want to replace the text.
>
> Good Luck,
> Ravi Gehlot.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316923
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4