What about swapping ' for '' ? Is the insertion of '' safe across the board, or is this dbms specific ?
I ask because having come from programming in other environments, I am already used to placing my sql commands through a formating function that swaps a single ' for two '', and just stuck with this method for perl. -Josh Original Message: ----------------- From: Kipp, James [EMAIL PROTECTED] Date: Tue, 15 Oct 2002 15:07:13 -0400 To: [EMAIL PROTECTED] Subject: RE: :: delimiting apostrophes to insert data w/o errors :: you can try the qw(...) function or use the DBI 'quote' method. > -----Original Message----- > From: Hastie, Christa [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 15, 2002 2:45 PM > To: '[EMAIL PROTECTED]' > Subject: :: delimiting apostrophes to insert data w/o errors :: > > > Hello! > I bet there is some really simple DBI function/reg ex that > delimits the > apostrophes like such (\') so data can be inserted into the db without > errors. > > i.e. this string: > INSERT INTO db (SomeColumn) VALUES ('John's car is cool!') > > becomes: > INSERT INTO db (SomeColumn) VALUES ('John\'s car is cool!') > > Anybody know the function/reg ex for this? > Thanks for any help in advance! > Appreciate it! > > - christa :) > > - - - - - - - - - - - - - - - - - - - - - - - - - > christa hastie > -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ .
