|
|
sybperl-l Archive
Up Prev Next
From: "Tanja Davidson" <tanja_davidson at ncsu dot edu>
Subject: Re: Single quotes around fields -- sybperl
Date: Jul 9 2001 6:07PM
single quotes have to be doubled before inserting into a sybase
database.
ie name=O'Connor
name=Smith
name=O'Malley
you'd do:
$name=$name;
$name=~ s/'/''/g;
to double quote the contents of $name and then you'd insert this new
variable. That's how I do it and it works great.
>>> rtillery@citistreetonline.com 7/9/01 2:00:34 PM >>>
Just a basic question - I'm a beginner at this (note "Intern" in my
autosignature!).
If I want to include single quotes in my fields, would this be the
proper
way:
mysqlstmt = { INSERT INTO somedb..sometable
'$someid',
$something
}
now, when I print the inserted row out, and $someid is empty (empty
string)
and $something = 123, will this appear:
'',
123
or will $someid show up as ' ' (note the space in there), or something
else
entirely?
I apologize if my phrasing is confusing or insulting -- thanks for your
time, everyone.
Thank you for your time and consideration,
Richard Tillery
Intern - Client Systems Development
Citistreet TBO Division
Internal ext. 12893
External 791-2893
Thank you for your time and consideration,
Richard Tillery
Intern - Client Systems Development
Citistreet TBO Division
Internal ext. 12893
External 791-2893
|