PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: single quotes and perl
Date: Jan 12 2001 5:40PM

Jason Stajich writes:
 > my $quotedfield = $dbh->quote($field);

She's using Sybase::CTlib - there's no quote() method there.

Michael

 > 
 > On Fri, 12 Jan 2001, Tanja Davidson wrote:
 > 
 > > I've got a newbie perl programmer question.
 > > 
 > > I've been using sybase::Ctlib to do my database connections and all has
 > > gone fine until I realized that there's a problem with single quotes if
 > > they exist in the text fields of my web forms.
 > > 
 > > Can anyone give me a work around for inserting and searching on text
 > > variables which may have embedded single quotes?  
 > > 
 > > The docs I've found so far have said to $var=~s/'/''/g but that ends up
 > > inserting two single quotes into my database which is unacceptable.  
 > > 
 > > This should be a fairly simple question for any guru who has done much
 > > perl programming with sybase databases and the web.
 > > 
 > > Thanks in advance!
 > > 
 > > 
 > 
 > Jason Stajich
 > jason@chg.mc.duke.edu
 > Center for Human Genetics
 > Duke University Medical Center 
 > http://www.chg.duke.edu/ 
 > 

-- 
Michael Peppler - Data Migrations Inc. - mpeppler@peppler.org
http://www.mbay.net/~mpeppler - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com