[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] filter existing data


On 02/05/2007 03:53 PM, DB wrote:
> I have a gift_note column in my transactions table. I've noticed that if
> customers hit the return key while adding data to this field from the
> checkout form, it screws things up when I export this data as a csv
> file. I've since created a filter for this to strip these "returns":
> 
> CodeDef no_crlf Filter
> CodeDef no_crlf Routine <<EOR
>  sub {
> my $val = shift;
> $val =~ s/[\r\n]+/ /g;
> return $val;
> }
> EOR
> 
> but how can I apply this filter to the existing mysql data which was
> submitted before I had this filter in place?

from the mysql shell:

UPDATE transactions SET comments = REPLACE(comments, '\n', ' ');

Peter

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.