<?php
$stmt = "INSERT INTO mytable VALUES ('one', 'two')";
$result = sesam_execimm($stmt);
$err = sesam_diagnostic();
echo "sqlstate = " . $err["sqlstate"] . "\n".
"Affected rows = " . $err["rowcount"] . " == " .
sesam_affected_rows($result) . "\n";
?>