- or download this
create table foo (
bar1 Int
,bar2 Int
);
- or download this
my $sth = $dbh->prepare_cached( "SELECT bar2 FROM foo WHERE bar1 = ?"
+);
$sth->execute( 2 );
- or download this
SELECT bar2 FROM foo WHERE bar1 = 2;
- or download this
SELECT bar2 FROM foo WHERE bar1 = '2';
- or download this
my $sth = $dbh->prepare_cached( "SELECT bar2 FROM foo WHERE bar1 = ?"
+);
$sth->bind_param( 1, 2, SQL_INTEGER );
$sth->execute();