- or download this
$name = "O'Reilly";
$sth = $db->prepare("SELECT * FROM emp WHERE name = '$name'");
$sth->execute();
- or download this
$name = "O'Reilly";
$sth = $db->prepare("SELECT * FROM emp WHERE name = ?");
$sth->execute($name);
- or download this
my $field = $old ? "olddata" : "newdata";
$sth = $db->prepare("SELECT * FROM ?");
$sth->execute($field);