Mysq sintax

where the sql sintax for transaction:
START TRANSACTION;
SELECT * FROM table;
COMMIT;
are correct??
mysql_query(); accept this code??