DB_common::provides() – Checks if the DBMS supports a particular feature


boolean provides ( string $feature )


Checks if a feature is available for the chosen database type.


string $feature

the feature to check

Possible values are:
$feature value Meaning
prepare The database does a pre-check of the SQL statement
pconnect The database supports persistent connections
transactions The database supports transactions
limit The database supports LIMITed SELECT statements

Return value

boolean - TRUE if the feature is supported


This function can not be called statically.

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.


Using provides()

// Once you have a valid DB object named $db...
if ($db->provides('pconnect')) {
"Persistent connections are allowed.\n";
Prepares a SQL statement for later execution (Previous) Sends a query to the database (Next)
Last updated: Sat, 28 Nov 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.