$dsn = "dblib:host=$host;dbname=$dbname";
$db = new PDO($dsn, $user, $password);
$sql="update dbo.X\$USERS set XU\$FLAG=XU\$FLAG | 8 where xu\$loginname='$username'";
$sth=$db->prepare($sql);
$sth->execute();
$dsn = "dblib:host=$host;dbname=$dbname";
$dbh = new PDO($dsn, $user, $password);
$val='blinstvo';
$tmt = $dbh->prepare( "INSERT INTO pbx.dbo.tmp (name) VALUES( '$val' )");
$dbh->beginTransaction();
$tmt->execute();
$dbh->commit();