develooper Front page | perl.dbi.users | Postings from March 2005

RE: string help!

Thread Previous | Thread Next
From:
Hardy Merrill
Date:
March 31, 2005 11:40
Subject:
RE: string help!
Message ID:
s24c0bca.002@SMTP.dhcr.state.ny.us
Just in case it's not clear to you, the "placeholders" are the question
marks in the VALUES part of the sql  ;-)

>>> "Ronald J Kimball" <rjk-dbi@focalex.com> 3/31/2005 2:36 PM >>>
Ron Stephan [mailto:elvis@elvisware.com] wrote: 

> Placeholders?
> 
> Like how?

Here's a quick example:

my $sth = $dbh->prepare(<<"EndOfSQL");
  INSERT INTO mytable
    (col1, col2)
  VALUES
    (?, ?)
EndOfSQL

$sth->execute($val1, $val2);

The DBI documentation has more details.


Ronald



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About