PHP Articles
Basic & Beginners
Advanced
Database
XML, Webservices
Design Patterns
Ajax
All Articles
Main Menu
Home
About PHP Hacks
Links
Contact Us
Search


PHP Database Tutorial
Using PEAR DB DataObject PDF Print E-mail
Monday, 24 July 2006
DB_DataobjectDB_Dataobject is a package from PEAR that takes care of entity management. DataObject performs 2 tasks:

   1. Builds SQL statements based on the objects vars and the builder methods.

   2. Acts as a datastore for a table row.

    The core class is designed to be extended for each of your tables so that you put the data logic inside the data classes.
    
At one time or another your web application is going to require you to manage your entities in some way, usually modifying the object state by performing one of the following basic operations:

•    add (INSERT)
•    modify (UPDATE)
•    remove (DELETE)

Read more...
 
Using PEAR DB PDF Print E-mail
Monday, 24 July 2006
While working with databases, wouldn’t you love to concentrate on coding rather than the syntax for a particular database API. Database Abstraction is a method of coding that lets you do just that. You use generic methods to access the database, any database. Obviously, you need additional code or libraries to do database abstraction. That is where PEAR comes in. PEAR includes a database abstraction class that you can use in your scripts. There are other abstraction classes out there, but for the purpose of this tutorial we will focus on the one provided with PEAR.
Read more...
 
PHP5 and MySQL PDF Print E-mail
Thursday, 06 July 2006
PHP comes packed with support for databases, which is good because developers often want to manage and store their data on a server.

PHP has included support for MySQL since version 3.x, although the procedure to activate this support has varied widely between versions. PHP 4.x included a set of MySQL client libraries, which were activated by default. PHP 5.x no longer bundles these libraries, however, due to licensing issues, so you need to obtain and install them separately. Then, you need to explicitly activate the MySQL extension—ext/mysql—by adding the --with-mysql option to PHP’s configure script.

The MySQL API built into PHP is designed to accomplish four primary goals:

•    Manage database connections
•    Execute queries
•    Process query results
•    Provide debugging and diagnostic information

Last Updated ( Thursday, 06 July 2006 )
Read more...
 

Syndicate


Login Form





Lost Password?
No account yet? Register