|
|
|
$pc = '123-4567-00';
$sth->prepare("SELECT * FROM PRODUCTS WHERE PROD_CODE = '$pc'")
$sth->execute();
or
$sth->prepare("SELECT * FROM PRODUCTS WHERE PROD_CODE = ?")
$sth->execute($pc); |
|
|
Multiple executions |
|
|
Automatic quoting |
|
|
Safer than string interpolation |
|
|
|
|