title: Catchable fatal error: Object of class PDOStatement could not be converted to string in D
body: <p>i have a problem that really warried me i create a website and I want my users first connect to the site, and then they fill information in a table, and then save the data and redisplay them by id
  this is what i'm teying to do </p>
  
  <pre><code>$id=#SESSION{idCommercant}
  //$mail=$_SESSION['_mail'];
  $reponse = $bdd-&gt;prepare("SELECT * FROM produit, produit_commerce, commerce, commercant
  where produit_commerce.idmagasin=commerce.idMagasin
  and produit.idProduit=produit_commerce.idproduit
  
  and  commerce.idCommercant= commercant.idCommercant
  and  commercant.idCommercant= :id  ;");
  
  $reponse-&gt;execute(array(':id'=&gt;$id)) or die(print_r($reponse-&gt;errorInfo()));
  </code></pre>
  
  <p>but this returns the following error:</p>
  
  <pre><code>Catchable fatal error: Object of class PDOStatement could not be converted to string in D:\wamp\www\it_technology\Affichage\essai.php on line 45
  </code></pre>