I'm trying to make my SQL calls more secure and I encounter 2 ways of making prepared statements, I was wondering if there is any difference between them.
This is the Query:
$query =
"INSERT INTO companies
VALUES(
NULL,
:name,
:assignation,
:priority
)";
1)
$statement = $pdoDbInstance->prepare($query);
$statement->bindValue(':name', $name);
$statement->bindValue(':assignation', $assignation);
$statement->bindValue(':priority', $priority);
$result = $statement->execute();
2)
$statement = $pdoDbInstance->prepare($query);
$result = $statement->execute(array(":name" => $name, ":assignation" => $assignation, ":priority" => $priority));
Is there any significant difference between them????