PHP
  Home arrow PHP arrow Introduction to Using SQLite with PHP 5
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
PHP

Introduction to Using SQLite with PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 17
    2006-12-04


    Table of Contents:
  • Introduction to Using SQLite with PHP 5
  • The basics of SQLite
  • Retrieving rows from a database table
  • Examining a few more row-fetching methods

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    Introduction to Using SQLite with PHP 5
    ( Page 1 of 4 )

    If you use PHP 5 to build web-based applications that access a database, you might want to consider SQLite. A "lighter" option than MySQL, this database may still suit your purposes if you don't need all of MySQL's bells and whistles. This three-part series covers many of SQLite's most useful features.

    Introduction

    On today's Web it is quite common to find websites that use some kind of database as an appropriate backend for housing their dynamic content. This content will be served to disparate site visitors by using either a procedural or an object-based application layer in conjunction with the corresponding presentation mechanism.

    Although the situation that I described above seems to grow increasingly common as the Web expands its apparently endless boundaries, I have to admit that this topic isn’t exactly the subject of this series. Instead, the question that I’d like to ask is the following: how many times during your life as PHP developer have you found yourself wishing to have at your disposal an RDBMS other than MySQL to fit your data storage requirements?

    Indeed, if you’re working on a particular web project that isn’t too demanding in terms of using a full-featured relational database system, the answer to the previous question should be "frequently." If the neatly-crafted PHP application that you’re currently developing needs to use an RDBMS, but doesn't require the utilization of the numerous, and sometimes overwhelming features offered by MySQL, I have good news for you.

    If you’ve been using PHP 5 for a while, maybe you’ve heard several comments about the cool RDBMS called “SQLite,” which comes embedded with the latest incarnation of the language. This feature is truly handy, since there’s no need to use a separate piece of software (like MySQL for instance) to build a database application.

    To be a little bit more specific concerning the topic, SQLite will let you perform most of the tasks you used to achieve with MySQL, like running buffered and unbuffered queries against a selected database, processing result sets in all sorts of clever ways, counting and seeking rows, and much more, by using only a group of intuitive methods (or functions, when using a procedural approach). Isn’t this great?

    Considering the numerous and handy features that come with the SQLite RDBMS, in this three-part series I’ll be introducing some of the most relevant ones. In this way you can start using them as part of your PHP 5-based applications.

    However, I’d like to clarify one more thing before diving into the subject: all the hands-on examples that you’ll learn here will use the object-based API included with this library. If you’re inclined to work with a procedural method, I suggest you take a look at the PHP manual to cover in detail this specific approach.

    With the preliminaries out of our way, it’s time to start discovering many of the useful methods that come bundled with SQLite. Let’s do it together!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - Implementing Factory Methods in PHP 5
    - Merging a File Split for FTP Upload using PHP
    - Getting Data from Yahoo Site Explorer Inboun...
    - Method Chaining: Adding More Selecting Metho...
    - How to Split a File During an FTP Upload Usi...
    - Expanding a Custom CodeIgniter Library with ...
    - Using the Yahoo Site Explorer Inbound Links ...
    - Building a CodeIgniter Custom Library with M...
    - Building an E-mini Trading System Using PHP ...
    - Completing the MySQL Class with Method Chain...
    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek