ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:database:mysql

This is an old revision of the document!


MySQL

mysqli driver

This is the preferred driver to connections to MySQL databases.

Driver Namemysqli
StatusActive
WindowsYes
UnixYes

This preferred driver uses the PHP mysqli interface and supports all MySQL table types, with full support for transactions and rollback when the MySQL table type supports it.

Support Status

This driver is actively supported by ADOdb project members


mysql driver

Driver Namemysql
StatusDeprecated
WindowsYes
UnixYes

This driver uses the PHP original mysql driver and only provides support to non-transactional tables such as MyIsam. It cannot be used with the PHP 'Improved' MySQL driver. The PHP driver is deprecated as of PHP Version 5.5 and will be removed in PHP version 7. This driver is deprecated as of ADOdb version 5.20 and will be removed in ADOdb version 6.0


mysqlt driver

Driver Namemysqlt
StatusDeprecated
WindowsYes
UnixYes

This driver uses the PHP original mysql driver and provided support to transactional tables such as InnoDB. It cannot be used with the PHP 'improved' MySQL driver. The PHP driver is deprecated as of PHP Version 5.5 and will be removed in PHP version 7. This driver is deprecated as of ADOdb version 5.20 and will be removed in ADOdb version 6.0


mysqlpo driver

Driver Namemysqlpo
StatusObsolete
WindowsYes
UnixYes

This driver duplicates the functionality of the mysqlt driver and is not maintained. It will be removed in ADOdb version 6.0

Driver Specific Issues

renameColumnSql

The method renameColumnSql normally takes 3 parameters, $tableName, $oldColumnName and $newColumnName. When used with the mysql provider, a full definition of the column must be provided, as if creating the column new

Usage

/*
* We are going to rename a column from col9 to col6.
*/
$flds = 'col6 C(50) NOTNULL DEFAULT "BILL"';
 
# Then create a data dictionary object, using this connection
$dict = NewDataDictionary($db);
 
$sql = $dict->renameColumnSql($table,'col9','col6', $flds);
v5/database/mysql.1448571109.txt.gz · Last modified: 2017/04/21 11:25 (external edit)