still solving mysql transaction problem. I am calling script through command line like :

mysql --user=user --password=password --database=TEST < test.sql > output.txt

and in test.sql have following :

update test set test1='uuu';
update test set test1='uuc';

It works perfectly! But my problem is : How do i realize if call COMMIT or ROLLBACK at the end of sql orders sequence??? and how do I add condition (something like IF ERROR THEN ROLLBACK ELSE COMMIT ????)

thanks a lot