In the catch clause, how do I determine which prepared statement caused the error so that I could apply debugDumpParams on it? See the below example.
$p1=db::db()->prepare("INSERT INTO t1 (a,b,c) VALUES (:a,:b,:c)");
$p2=db::db()->prepare("INSERT INTO t2 (a,b,c) VALUES (:a,:b,:c)");
try{
$data=array('a'=>1,'b'=>2,'c'=>3);
$p1->execute($data);
$p2->execute($data);
}
catch(PDOException $e){
//Display debugDumpParams() for the statement that caused the error
}