With PHP
, I am trying to execute many queries with PDO in for loop and I want to make the DB
optimizer does the soft parsing.
I am binding parameters now but I am not sure if the optimizer really uses the soft parsing.
The sample query
select * from table as t where t.id = :id ;
PHP
code
$query = "select * from table as t where t.id = :id ;"
$pdo->prepare($query);
$id = 0;
$query->bindParam(':id', $id, PDO::PARAM_INT);
for($id; $id<10; $id++){
$query->execute()
}