MySQL
  Home arrow MySQL arrow Performing Basic Tasks with MySQL 4.1 ...
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 
eWeek
 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

Performing Basic Tasks with MySQL 4.1 and Above, using mysqli with PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 16
    2006-06-27

    Table of Contents:
  • Performing Basic Tasks with MySQL 4.1 and Above, using mysqli with PHP 5
  • Performing basic operations: connecting to MySQL, running queries and more
  • Leveraging the real power of the “mysqli” extension: running multiple queries
  • Preparing SQL queries: using the “prepare()”, bind_param()” and “execute()” methods

  • 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

    Virtual Tradeshows by Ziff Davis Enterprise - A Unique Opportunity to Connect with IT Experts, Access Information, and Gain Insight on today's Technology

    Performing Basic Tasks with MySQL 4.1 and Above, using mysqli with PHP 5
    (Page 1 of 4 )

    For anyone who has spent a few weeks working with PHP 5, the plethora of cool improvements and new features added to this incarnation of the language has brought a new, more powerful level for developing and deploying Web applications. These include the implementation of exceptions and the brand new object model. But what if I tell you that now you can use PHP 5 to work with MySQL, using an object-oriented approach?

    Introduction

    All right, I know that you're now saying that's not breaking news, since the implementation of objects is an old programming feature. However, PHP 5 has a lot more to offer when it comes to using MySQL. If you're using MySQL 4.1 and above, the good news is that PHP 5 offers a fairly comprehensive extension, called "mysqli," which allows you to interact natively with MySQL via an object-based approach, aside from taking advantage of the new functionality provided by the database server.

    If this subject already caught your curiosity, by using the "mysqli" library in conjunction with MySQL 4.1 and up, you'll be able to execute multiple queries in a single step, and process subsequent result sets. Also, the extension offers other advantages, such as using the "commit" and "rollback" features, all based on an easy-to-grasp object-oriented environment. Using a procedural approach is also possible if you wish.

    As you can see, the "mysqli" library looks really interesting and useful, therefore in this series, I'll be introducing its most important methods and properties, along with the implementation of some advanced approaches, including the features that I mentioned before, and many more handy topics. At the end of the series, you should be equipped with a good background for using "mysqli" together with MySQL 4.1 and above.

    So, let's not waste any more time in preliminaries and start exploring this cool PHP extension. Fun is already guaranteed!

    More MySQL Articles
    More By Alejandro Gervasio


       · In this first part of the series, you'll learn how to use the most relevant methods...
     

       

    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...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




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