List:General Discussion« Previous MessageNext Message »
From:Vivek Khera Date:March 25 1999 4:32pm
Subject:Re: Extracting a given row using Perl API
View as plain text  
>>>>> "DHS" == Derick H Siddoway <Derick.H.Siddoway@stripped>
> writes:

DHS> What you probably want to do is something like this:
DHS> 	my $sth = $dbh->prepare("SELECT first,last,phone FROM $table WHERE
DHS> 	phone_book.last='$FOO'");

DHS> OR store the value in $FOO like this

DHS> 	$FOO = "'Blow'";

Or better,

 $FOO = $dbh->quote("Blow");

which will work for any value of "Blow", including those that contain
embedded ' characters and backslashes.


								v.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@stripped       Rockville, MD       +1-301-545-6996
PGP & MIME spoken here            http://www.kciLink.com/home/khera/
Thread
Extracting a given row using Perl APIWilliam R. Mattil25 Mar
  • Re: Extracting a given row using Perl APIAldrian Gintingsuka25 Mar
  • Re: Extracting a given row using Perl APIVivek Khera25 Mar
  • Re: Extracting a given row using Perl APIChris25 Mar
  • Re: Bug reportFred van Engen16 Feb
Re: Extracting a given row using Perl APIDerick H Siddoway25 Mar
Re: Extracting a given row using Perl APIVivek Khera25 Mar