Isaac, that didn't work for me.  What I'm doing is if a user deletes
an image from the image library, then I want to delete any reference
to that image from the content table in the database.  I'm passing in
a URL variable for the image name (URL.img).  Here is my query:

<cfquery name="fixContent" datasource="#request.app.dsname#">
        UPDATE          tblContent
        SET                     content = <cfqueryparam 
cfsqltype="CF_SQL_VARCHAR"
value="#REReplaceNoCase(checkcontent.content,"<img[[:space:]][^>]*src=""[^""]*#URL.img#[[:
space:]]*""[^>]*>","","ALL")#">
        WHERE           ID = <cfqueryparam cfsqltype="CF_SQL_INTEGER" 
value="#checkcontent.id#">
</cfquery>

Yet, when I pass in "tanlines.jpg" as URL.img, it doesn't delete the
image from this content:

<img height="144" width="216" align="right" alt=""
src="/site/images/siteimages/Image/tanlines.jpg" />Welcome to the web
site.

I figured out that I needed to "double up" the doublequotes so that
code doesn't throw an error (note that I am using it inside of a
CFQUERYPARAM), is my problem how I'm referencing the URL.img value?

Thanks,

Pete

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236549
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to