You dont HAVE to use CFQUERYPARAM in your queries. If your trying to validate int values, you could just as easily use VAL() to do it
DELETE FROM standard_attribute_value_translation savt WHERE EXISTS ( SELECT sav.id FROM standard_attribute_value sav WHERE sav.id = savt.standard_attribute_value_id_fk AND sav.standard_attribute_id_fk = #Val(this.id)# ); If anyone tries to pass text into the function its just going to evaluate to 0 anyway Steve -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Toby Tremayne Sent: Thursday, 10 July 2003 12:15 AM To: CFAussie Mailing List Subject: [cfaussie] Re: Strange behaviour with MYSQL -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 you sure it's not just the queryparam causing your problems? I've had some weird issues with queryparam and mysql in the past - one's I've never been able to come up with a satisfactory answer for - perhaps try the query as is but use the raw variable instead of the queryparam? Toby On Wednesday 09 July 2003 23:40, you wrote: > Thanks Tim, > > It is strange though that this query works in the Mysql client but no > through CF. I actually want to delete from multiple tables but I just cut > the query down a bit to simplify it so I would prefer to use this syntax > for now. Super frustrating! Is mysql just not up to scratch? I have been > using it now for the last year and a bit with no problems....unitl now.... > > >:O( > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Tim > Sent: Wednesday, 9 July 2003 3:06 PM > To: CFAussie Mailing List > Subject: [cfaussie] Re: Strange behaviour with MYSQL > > > How about: > > DELETE > FROM standard_attribute_value_translation savt > WHERE EXISTS ( SELECT sav.id > FROM standard_attribute_value sav > WHERE sav.id = savt.standard_attribute_value_id_fk > AND sav.standard_attribute_id_fk = <cfqueryparam value="#this.id#" > cfsqltype="CF_SQL_INTEGER"> ); > > - timmah > > Jordan Thomas spoke the following wise words on 9/07/2003 8:09 PM EST: > >When I try to run the following <cfquery> nothing happens. It throws no > >error but the data is still there. > > > ><cfset this.id = 5> > > > ><cfquery name="qDeleteTranslations" datasource="scoop"> > > DELETE standard_attribute_value_translation > > FROM standard_attribute_value_translation savt, > > standard_attribute_value > > >sav > > WHERE savt.standard_attribute_value_id_fk = sav.id > > AND sav.standard_attribute_id_fk = <cfqueryparam value="#this.id#" > >cfsqltype="CF_SQL_INTEGER" maxlength="8"> > ></cfquery> > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to > [EMAIL PROTECTED] > > MX Downunder AsiaPac DevCon - http://mxdu.com/ > > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to > [EMAIL PROTECTED] > > MX Downunder AsiaPac DevCon - http://mxdu.com/ - -- - -------------------------------- Life is poetry - write it in your own words - -------------------------------- Toby Tremayne Code Poet and Zen Master of the Heavy Sleep Senior Technical Consultant Lyricist Software www.lyricist.com.au +61 416 048 090 ICQ: 13107913 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/DCNK6KYxVcB16DkRAocHAJwLtQTGTIUQJwnPGfVQ81oi+0B1/gCfcWFw 5mZ+dBnFLmM1yFYQ/Bq0lJg= =JqI3 -----END PGP SIGNATURE----- --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/ --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/
