- or download this
perl -T your_script [args...]
- or download this
$sql = "select * from some_table where some_col = $target";
$sth = $dbh->prepare( $sql );
$sth->execute;
...
- or download this
$sql = "select * from some_table where some_col = ?";
$sth = $dbh->prepare( $sql );
$sth->execute( $target );
- or download this
$sql = "select $colum from $table";
- or download this
my $cols = ( foo => 'foo', bar => 'bar', baz => 'baz' );
my $tbls = ( parts => 'parts', table2 => 'table2' );
...
my $sql = "select $cols{$inp_col} from $tbls{$inp_tbl}";
# now it's safe to run the query...
}