"Beginner" schreef:
> my ($rows) = $dbh->selectrow_array("SELECT foo FROM bar where
> path=?",undef,q($name)) or die snip
Your q($name) creates the literal string $name.
my ($rows) =
$dbh->selectrow_array(
"SELECT foo FROM bar where path=?",
undef,
$name
On 29 Oct 2007 at 10:55, Paul Lalli wrote:
> On Oct 29, 12:31 pm, [EMAIL PROTECTED] (Dr.Ruud) wrote:
> > "Beginner" schreef:
> >
> > > I am trying to insert a lots file paths into an SQLite table and am
> > > having trouble with filenames with apostrophes in.
> >
> > Use placeholders,
>
> Good ad
On Oct 29, 12:31 pm, [EMAIL PROTECTED] (Dr.Ruud) wrote:
> "Beginner" schreef:
>
> > I am trying to insert a lots file paths into an SQLite table and am
> > having trouble with filenames with apostrophes in.
>
> Use placeholders,
Good advice.
> so prepare/execute.
irrelevant advice, nothing to do
"Rob Coops" schreef:
> See: http://search.cpan.org/~timb/DBI-1.601/DBI.pm#quote for more
> information
Read
http://search.cpan.org/~timb/DBI-1.601/DBI.pm#Placeholders_and_Bind_Values
first.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
"Beginner" schreef:
> I am trying to insert a lots file paths into an SQLite table and am
> having trouble with filenames with apostrophes in.
Use placeholders, so prepare/execute.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
Since I never worked with an SQLite DB I am not sure how well this will work
but you might want to have a look at the following command in the DBI:
$dbh->quote($value);
This should make the whole thing SQL approved with escaped special
characters and everything... Now as I said I have no idea how
On 29 Okt, 16:14, [EMAIL PROTECTED] (Beginner) wrote:
> Hi,
>
> I am trying to insert a lots file paths into an SQLite table and am
> having trouble with filenames with apostrophes in.
>
> Below is the snippet I have been using. I have experimented with
> sprintf, qq and a combination of both but