Home arrow MySQL arrow Implementing the commit() and rollback() Methods with mysqli and PHP 5

Implementing the commit() and rollback() Methods with mysqli and PHP 5

If you want to use the "mysqli" extension, you've come to the right place. This is the second part of the series “Using mysqli with PHP 5.” Welcome back. In three tutorials, this series shows how to use the most important methods and properties included in the “mysqli” extension that comes with PHP 5, in order to take advantage of the new features bundled with MySQL 4.1 and above.

  1. Implementing the commit() and rollback() Methods with mysqli and PHP 5
  2. Working with “InnoDB” tables: using the “commit()” and “autocommit()” methods
  3. Canceling database modifications: using the “rollback()” method
  4. Escaping strings, counting rows and more: using the “real_escape_string()” method and the “affected_rows” property
By: Alejandro Gervasio
Rating: starstarstarstarstar / 20
July 03, 2006

print this article




Stepping back for a moment to the topics that I covered in the first tutorial, you’ll probably remember how to connect to the MySQL server and use the “multi_query()” method for running multiple queries, in addition to handling several result sets at the same time. This can definitely can introduce significant changes to the way that you develop your MySQL-based applications.

Also, I’d like to mention the great functionality provided by this extension to bind different queries to specific parameters, which are replaced with real values during the execution of an application. This particular feature allows the definition of “generic” queries that eventually will be attached to different arguments, resulting in an easier and more flexible process for generating dynamic queries.

All right, I believe that all the topics I mentioned before are now fresh in your mind. Therefore it’s time to move on and focus our attention on the subject of this second article, so you know what to expect from it. Over the course of this installment, I’ll explain how to use the “commit()” and “rollback()” methods included within the “mysqli” library, among other handy methods, which hopefully will provide you with a more robust grounding in the capabilities of MySQL 4.1 and above.

Are you ready to continue learning more about all these useful features? Okay, let’s get started!

>>> More MySQL Articles          >>> More By Alejandro Gervasio

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Oracle Unveils MySQL 5.6
- MySQL Vulnerabilities Threaten Databases
- MySQL Cloud Options Expand with Google Cloud...
- MySQL 5.6 Prepped to Handle Demanding Web Use
- ScaleBase Service Virtualizes MySQL Databases
- Oracle Unveils MySQL Conversion Tools
- Akiban Opens Database Software for MySQL Use...
- Oracle Fixes MySQL Bug
- MySQL Databases Vulnerable to Password Hack
- MySQL: Overview of the ALTER TABLE Statement
- MySQL: How to Use the GRANT Statement
- MySQL: Creating, Listing, and Removing Datab...
- MySQL: Create, Show, and Describe Database T...
- MySQL Data and Table Types
- McAfee Releases Audit Plugin for MySQL Users

Developer Shed Affiliates


Dev Shed Tutorial Topics: