I understood that it might not be possible to get the finally executed query used by PDO because of the way PDO works but I will appreciate any work around to this. I really need to view the exact query for debugging purpose. Your help will be appreciated.
$sql = "Update country SET name=:name, code=:code, dial_code=dial_code, flag=:flag, capital=:capital, region=:region, region_des:region_des WHERE id=:id";
$stmt = $pdo->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));
$stmt->bindParam(':id',$c->getId(), PDO::PARAM_INT);
$stmt->bindParam(':name',$c->getName(), PDO::PARAM_STR);
$stmt->bindParam(':code',$c->getCode(), PDO::PARAM_STR);
$stmt->bindParam(':dial_code',$c->getDialCode(), PDO::PARAM_STR);
$stmt->bindParam(':flag',$c->getFlag(), PDO::PARAM_STR);
$stmt->bindParam(':capital',$c->getCapital(), PDO::PARAM_STR);
$stmt->bindParam(':region',$c->getRegion(), PDO::PARAM_STR);
$stmt->bindParam(':region_des',$c->getRegionDes(), PDO::PARAM_STR);
$stmt->execute();
//error_log("I need the query here.....")