zanoni
October 9, 2006, 11:32pm
1
I have a text field and want to let users insert multiple values -
If I type one two , the sql statement is ‘1 2’
if i put a comma between it turns it to 1,\2
I need it to do ‘1’,2’
I tried some regex but no luck because whatever I do to format I’m
getting
back slashes.
Anything ?
Stuart
–
Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla
The te...
zanoni
October 10, 2006, 2:21am
2
split the field on the comma, then wrap each element in single quotes,
then join the array with a comma:
values = params[:myfield].split(’,’).each {|v| v = “’#{v}’”}.join(’,’)
something along those lines… the above is untested
zanoni
October 10, 2006, 3:55am
3
Hello Stuart.
Dark A. wrote:
I have a text field and want to let users
insert multiple values -
Sorry to hear you’re having problems. Shoudl we guess what your code
looks
like?
Bill
zanoni
October 10, 2006, 1:52pm
4
Bill my friend, hope your well. I believed what I had written was
sufficient, my bad.
Anyway, problem has been solved using .split(‘,’).
Thank you for responding. I know sometimes I ask way too many questions
here.
Stuart
On 10/9/06, Bill W. [email protected] wrote:
looks
like?
Bill
–
Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla
The te...