bobbybobbertson
Programmer
What function do I use to prepare data that might be anything including quotes for DBI's mysql prepare and execute statements?
In other words how do I prepare the Unknown data below so that it won't screw up the "do" statement?
my $unknown_data = "this could have anything including single and double quotes";
$dbh->do("UPDATE transaction SET $colum = $unknown_data WHERE $column = '$trans_id')"
or die "Couldn't update recdord : $DBI::errstr";
In other words how do I prepare the Unknown data below so that it won't screw up the "do" statement?
my $unknown_data = "this could have anything including single and double quotes";
$dbh->do("UPDATE transaction SET $colum = $unknown_data WHERE $column = '$trans_id')"