[prev in list] [next in list] [prev in thread] [next in thread]
List: dbi-dev
Subject: Simple DBI questions
From: Liam Kirsher <liam () numenet ! com>
Date: 1997-11-28 22:46:15
[Download RAW message or body]
*** From dbi-users -- To unsubscribe, see the end of this message. ***
Hi,
I've just started using DBI, with mSQL, and have run into something that is
puzzling to me.
DBI::neat seems to behave strangely. I expected that single quote
characters,"'", would be escaped. Trying to insert a string like "What's
the problem?" fails.
$str = DBI::neat("What's the problem? String too long?", 20);
Yields
'What's the problem? ...
which is obviously a problem! The apostrophe is not escaped and there is
no ending quote after the ellipsis.
Anyway, I can work around this myself, so it's not *such* a big deal, but
it would be nice if neat() took care of it.
($str = $m->title()) =~ s/'/\\'/g;
$str = DBI::neat($str,50);
$str =~ s/\.\.\.$/\.\.\.'/;
push (@stmt, $str);
But, when I looked for the neat subroutine in DBI.pm (and DBD.pm) I
couldn't find it anywhere, only neat_list. There must be some kind of Perl
magic going on there. Can anyone enlighten me?!
Liam
-----------------------------------------------------------------------
Liam Kirsher Email: liam@numenet.com
Numenet, Inc. Voice: 415-456-6822
775 E. Blithedale Ave. Suite 176 Fax: 415-456-0599
Mill Valley, CA 94941 URL: http://www.numenet.com
-----------------------------------------------------------------------
------------------------------------------------------------------------------
To unsubscribe from this list, please visit http://www.fugue.com/dbi
If you are without web access, or if you are having trouble with the web page,
please send mail to dbi-request@fugue.com. Please try to use the web
page first - it will take a long time for your request to be processed by hand.
------------------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic