Which is the correct way to use PDO in PHP?
Posted
by Runner
on Stack Overflow
See other posts from Stack Overflow
or by Runner
Published on 2010-04-20T13:53:38Z
Indexed on
2010/04/20
14:03 UTC
Read the original article
Hit count: 251
One from here:
$sth->execute(array(':calories' => $calories, ':colour' => $colour));
The other from here:
/*** reassign the variables again ***/
$data = array('animal_id'=>4, 'animal_name' => 'bruce');
/*** execute the prepared statement ***/
$stmt->execute($data);
My question is: :key
or key
?
Sorry I don't have the PHP environment here.
© Stack Overflow or respective owner