The default MySQL table type is MyISAM, which doesn't support transactions. Thankfully there is another table type InnoDB, which does support transactions. Converting the table type is easy enough:
http://dev.mysql.com/doc/refman/5.0/en/converting-tables-to-innodb.html
And when making queries do this:
START TRANSACTION
// do whatever queries you want to
// if there are no errors
COMMIT
// if there are errors
ROLLBACK
After a rollback, your db will return to the state it was at the point you called START TRANSACTION. This tutorial should help some more:
http://www.devshed.com/c/a/MySQL/Using-Transactions-In-MySQL-Part-1/
Note: You can't use FULLTEXT queries with InnoDB tables.