-- Robert <[EMAIL PROTECTED]>
This is my hash structure:
"Veterans Day" => {
date=> '2005',
type=> 'US',
federal => 'true',
active => 'true',
},
Would I just use a placeholder (?) in my statement and pass it in via
that? It will be in a loop as I have quite a f
-- Robert <[EMAIL PROTECTED]>
This is my hash structure:
"Veterans Day" => {
date=> '2005',
type=> 'US',
federal => 'true',
active => 'true',
},
Would I just use a placeholder (?) in my statement and pass it in via
that? It will be in a loop as I have quite a f
On Thu, 21 Apr 2005 09:36:33 -0400, Robert wrote:
>This is my hash structure:
>
>"Veterans Day" => {
>date=> '2005',
>type=> 'US',
>federal => 'true',
>active => 'true',
> },
>
>Would I just use a placeholder (?) in my statement and pass it in via that?
Use DBIx::Sim
On 04/21/2005 10:11 AM, Robert said:
This was "a" solution:
my $insert_stmt = "Insert into TABLE (name, date, type, federal, active)
values( :name, :date, :type, :federal, :active )";
my $sth = $dbh->prepare( $insert_stmt );
my $holidays;
foreach my $name ( keys %holidays ) {
$sth->bind_p
David,
Your solution is similar to mine. But I like your use of the hash slice
better. I keep forgetting about those darn slices.
-Original Message-
From: David [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 21, 2005 6:53 AM
To: dbi-users@perl.org
Subject: Re: inserting data coming
$sth->bind_param($i++, $d->{$_}) foreach @members; $sth->execute();
Warning. This is untested code. But hopefully you get the idea.
Was this the kind of answer that you were looking for?
-Original Message-
From: Robert [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 21, 2005 6:37 A
This was "a" solution:
my $insert_stmt = "Insert into TABLE (name, date, type, federal, active)
values( :name, :date, :type, :federal, :active )";
my $sth = $dbh->prepare( $insert_stmt );
my $holidays;
foreach my $name ( keys %holidays ) {
$sth->bind_param( ':name', $name );
$s
On 4/21/05, Robert <[EMAIL PROTECTED]> wrote:
> This is my hash structure:
>
> "Veterans Day" => {
> date=> '2005',
> type=> 'US',
> federal => 'true',
> active => 'true',
> },
>
> Would I just use a placeholder (?) in my statement and pass it in via that?
> It will
On Thu, Apr 21, 2005 at 09:36:33AM -0400, Robert wrote:
> This is my hash structure:
>
> "Veterans Day" => {
> date=> '2005',
> type=> 'US',
> federal => 'true',
> active => 'true',
> },
>
> Would I just use a placeholder (?) in my statement and pass it in via that?
On Thu, 21 Apr 2005 09:36:33 -0400, "Robert" said:
> This is my hash structure:
>
> "Veterans Day" => {
> date=> '2005',
> type=> 'US',
> federal => 'true',
> active => 'true',
> },
>
> Would I just use a placeholder (?) in my statement and pass it in via
> that?
>
This is my hash structure:
"Veterans Day" => {
date=> '2005',
type=> 'US',
federal => 'true',
active => 'true',
},
Would I just use a placeholder (?) in my statement and pass it in via that?
It will be in a loop as I have quite a few.
Thoughts and suggestions would
11 matches
Mail list logo