From: tim.bow...@mapforge.com.au (Tim Bowden)
Date: Mon, 22 Oct 2012 16:11:53 +0800
Local: Mon, Oct 22 2012 4:11 am
Subject: Re: Prepared statements- variable number of placeholders- SOLVED
Thanks Henri. Much appreciated.
On Mon, 2012-10-22 at 09:21 +0200, Henri Asseily wrote:
> The $sth is a mutable string… Which means you can change it at runtime!
> Here's an example of a modified $sth at runtime:
> my $up_sql = defined($updated_at) ? 'updated_at < ? AND ' : undef;
> On Oct 22, 2012, at 9:16 AM, Tim Bowden <tim.bow...@mapforge.com.au> wrote:
> > Is it possible, and if so, how can I set the number of placeholders in a
> > IE, given something like:
> > my $sth = $dbh->prepare("INSERT INTO $table ($fields) VALUES (?,?,?));
> > which is fine if I know how many fields I'm inserting into, but what if
> > Thanks,
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.