This is a detailed tutorial intended for the PHP programmer interested in learning more about database connectivity - using the ODBC standard. You should be familiar with PHP syntax and have a working knowledge of databases.
PEAR's DB classes are one of the database abstraction layers. This article takes a look at some traditional database access methods and then compare them with the method employed by PEAR.
This article addresses two SQL-related issues in PHP: 1) Creating complex, powerful, queries to take advantage of your table schemas, and 2) Building those queries on the fly according to user input.
This is a nice tutorial on how to use PostgreSQL and PHP together. Topics covered include: Installation of PostgreSQL, PHP, and Apache, A Brief Introduction and Basic Commands, Different Types of Data, Retrieving Data from a Database, Inserting Data into a Database, Updating Data in a Database, Deleting Data from a Database, Dealing with Errors, and Including Files. The tutorial is also available for download.
This tutorial explains the need for database abstraction in PHP, and shows how to create your own database API that can be to used with different types of databases. The tutorial uses a PHP PostgreSQL API as an example.
In this Part 2 of the article "Building Next/Prev Buttons for Query Results," you will be shown a sample code designed to work in most instances (with minor changes).
In PHP every database is accessed slightly differently. To connect to MySQL, you would use mysql_connect(). When you decide to upgrade to Oracle or Microsoft SQL Server, you would use ocilogon() or mssql_connect() respectively. What is worse is that the parameters you use for the different connect functions are different also.. That's why a database wrapper library such as ADODB comes in handy when you need to ensure portability.
<p>
This tutorial has been translated into multiple languages, including German, Spanish, Polish, Thai and Chinese.
PHP4 is packed with good features. One of the most popular is session variables. These are variables that persist throughout a session, as the user moves from page to page. Session variables are great holders of state information and other useful stuff. PHP4's session variables are stored in files by default. However for true scalability, it is better to store this data in a database using a database wrapper library like ADODB. ADODB supports Oracle, MySQL, PostgreSQL, Interbase, MSSQL, VFP, Access, ADO.
This article describes how to make Access and PHP work together using the ODBCSocketServer, an open source socket server, available at http://odbc.linuxave.net/. This tutorial will take you through configuring your machines and using the socket server.
The author notes, "Last week we introduced you to the basics of creating an efficient database table structure. After today's concluding article of this series you'll be able to create some of your own MySQL-powered applications, or use this syntax as the basis for learning to create normalized databases on your database server of choice."