Question
Help with simple Replace?
Hi,
Ok, I've been staring at this for way too long. I know I'm missing something dumb here but I've been trying for over an hour and I just can't find it! Please take a look...
I'm looping through a series of form variables, inserting them to a table. All working just fine. But on the "cell number" value, I'm trying to strip out dashes if anyone inserts them. IE, "123-456-7890" should become "1234567890".
Here's what I've got...
<cfset cellnumber = "FORM.cellnumber_#Pcount#">
<cfset cellnumber = #Replace(cellnumber,"-","","all")# >
<cfset cellnumber = Evaluate(cellnumber)>
And then a standard cfquery insert of #cellnumber# among other variables.
All the inserts work fine. They just all still have dashes in them. I've tried every variation of syntax I can think of. Can anyone spot the problem? Is there some problem with the logical flow I'm not seeing?
Thanks...
Ok, I've been staring at this for way too long. I know I'm missing something dumb here but I've been trying for over an hour and I just can't find it! Please take a look...
I'm looping through a series of form variables, inserting them to a table. All working just fine. But on the "cell number" value, I'm trying to strip out dashes if anyone inserts them. IE, "123-456-7890" should become "1234567890".
Here's what I've got...
<cfset cellnumber = "FORM.cellnumber_#Pcount#">
<cfset cellnumber = #Replace(cellnumber,"-","","all")# >
<cfset cellnumber = Evaluate(cellnumber)>
And then a standard cfquery insert of #cellnumber# among other variables.
All the inserts work fine. They just all still have dashes in them. I've tried every variation of syntax I can think of. Can anyone spot the problem? Is there some problem with the logical flow I'm not seeing?
Thanks...
