How can I display the numbers of affected rows in this:
$sql = $conn->prepare ("UPDATE countries SET country=:country");
$sql->bindValue(":country", "blablaa");
$sql->execute();
And how can I show the last inserted ID with this:
$sql = $conn->prepare ("INSERT INTO countries (country) VALUES (:country)");
$sql->bindValue(":country", "test");
$sql->execute();
echo $sql->lastInsertId(); // id of last inserted
I tried, but am receiving an error call to undefined method PDO::lastInsertId()