|
|
sybperl-l Archive
Up Prev Next
From: Stephen dot Sprague at morganstanley dot com
Subject: Re: Single quotes around fields -- sybperl
Date: Jul 9 2001 7:38PM
Richard-
You must be expecting man-eating ex-cons on this list, eh?
I may not follow you exactly but maybe these two examples will help.
in perl:
#this stores "go yankees"
my ($char_data, $int_data) = ('go yankees', 2001);
my $sql = qq/insert into db..tab('$char_data', $int_data)/;
#this stores "go yankee's"
my ($char_data, $int_data) = ("go yankee's", 2001);
my $sql = qq/insert into db..tab('$char_data', $int_data)/;
Cheers,
Mad Dog
On Mon, 9 Jul 2001 @ 2:00pm, an entity claiming to be Tillery, Richard...:
rtille :
rtille :Just a basic question - I'm a beginner at this (note "Intern" in my
rtille :autosignature!).
rtille :If I want to include single quotes in my fields, would this be the proper
rtille :way:
rtille :
rtille : mysqlstmt = { INSERT INTO somedb..sometable
rtille : '$someid',
rtille : $something
rtille : }
rtille :
rtille :now, when I print the inserted row out, and $someid is empty (empty string)
rtille :and $something = 123, will this appear:
rtille :
rtille : '',
rtille : 123
rtille :
rtille :or will $someid show up as ' ' (note the space in there), or something else
rtille :entirely?
rtille :I apologize if my phrasing is confusing or insulting -- thanks for your
rtille :time, everyone.
rtille :
rtille :Thank you for your time and consideration,
rtille :
rtille :Richard Tillery
rtille :Intern - Client Systems Development
rtille :Citistreet TBO Division
rtille :Internal ext. 12893
rtille :External 791-2893
rtille :
rtille :
rtille :Thank you for your time and consideration,
rtille :
rtille :Richard Tillery
rtille :Intern - Client Systems Development
rtille :Citistreet TBO Division
rtille :Internal ext. 12893
rtille :External 791-2893
rtille :
rtille :
|