I asked a question about the best way, performace-wise, to make multiple inserts( hundreds or even thousands) in prepared statements. See here for it How to perform multiple MySQL inserts in PHP.
In the course of answering the question, this old issue came up again : Do multiple SQL calls really take place in the following or not? :
$stmt = $dbLink->prepare( "INSERT INTO table SET id = :ID,
name = :name,
email = :email,
mobile = :mobile");
$stmt->bindParam( ':ID', $person->getID(), PDO::PARAM_STR );
$stmt->bindParam( ':name', $person->getName(), PDO::PARAM_STR );
$stmt->bindParam( ':email', $person->getEmail(), PDO::PARAM_STR );
$stmt->bindParam( ':mobile', $person->getMobile(), PDO::PARAM_STR );
foreach( $persons as $person ){
$stmt->execute();
}
Please, I think something like this cannot be right and wrong at the same time. There has to be a fact about it; and I just don't know that fact.