rollback is the opposite of the commit function. If you are using a database that supports transactions, rollback is used to revert to the previous data in case of a problem. So, if you begin a transaction and an error occurs in the program, you can set up a call to the rollback function so that any changes that have not yet been committed to the database will go back to their original values.
Example:
$return_code = $query_handle->rollback;
The preceding example reverts to the original data; any changes that have been made on the $query_handle handle will be thrown out. If there is a problem with the rollback, an error code will be returned and stored in $return_code.