MySQL
  Home arrow MySQL arrow Implementing the commit() and rollback...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MYSQL

Implementing the commit() and rollback() Methods with mysqli and PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2006-07-03

    Table of Contents:
  • Implementing the commit() and rollback() Methods with mysqli and PHP 5
  • Working with “InnoDB” tables: using the “commit()” and “autocommit()” methods
  • Canceling database modifications: using the “rollback()” method
  • Escaping strings, counting rows and more: using the “real_escape_string()” method and the “affected_rows” property

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Ziff Davis Enterprise Virtual Tradeshows: Hot Topics, Cutting Edge Technology, Real-time Interaction with IT Professionals. Learn more at ziffdavisvts.com

    Implementing the commit() and rollback() Methods with mysqli and PHP 5
    (Page 1 of 4 )

    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.

    Introduction

    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


       · In this second installment of the series, the use of the "commit()" and rollback()...
       · what about MyISAM type databases, can same methods work with MyISAM DBs. If not,...
       · Thank you for commenting on my article. With regard to your question, you have some...
       · Thank you for this tutorial. As I was implementing transactions into my project I...
       · I made a mistake. I was using mysqli->multi_query(), this prevented the transaction...
       · Hello again Rafael,Thank you for posting your comments here, and also I'm glad...
     

       

    MYSQL ARTICLES

    - MySQL Table Prefix Changer Tool in PHP
    - Using the SIGNAL Statement for Error Handling
    - Error Handling Examples
    - Error Handling
    - Completing a Search Engine with MySQL and PH...
    - Paginating Result Sets for a Search Engine B...
    - Building a Search Engine with MySQL and PHP 5
    - Using Boolean Operators for Full Text and Bo...
    - PHP, MySQL and the PEAR Database
    - Working with PHP and MySQL
    - Getting PHP to Talk to MySQL
    - Creating an RSS Reader: the Reader
    - MySQL Security Overview
    - Creating the Admin Script for a PHP/MySQL Bl...
    - Creating the Blog Script for a PHP/MySQL Blo...




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway