DB_common::provides() -- Checks if the DBMS supports a particular feature
Descripción
Checks if a feature is available for the chosen database type.
Parámetro
- string
$feature
the feature to check
Tabla 35-1. Possible values are:
| $feature value | Meaning |
|---|
| prepare |
The database does a pre-check of the SQL statment
|
| pconnect |
The database supports persistent connections
|
| transactions |
The database supports transactions
|
| limit |
The database supports LIMITed SELECT statments
|
Valor devuelto
boolean - TRUE if the feature is supported
Nota
Esta función no puede ser llamada
estáticamente.
| Aviso |
The provided information are only hints. Check the documentation
of your database system for the real supported features.
I.e. MySQL supports transactions, but not for every table type.
|
Ejemplo
Ejemplo 35-1. Using provides()
<?php
// Once you have a valid DB object named $db...
if ($db->provides('pconnect')) {
echo "Persistent connections are allowed.\n";
}
?>
|
|