For using database, you need to install a package of PEAR called ‘MDB2’ along with the installation of PEAR and Smarty.
MDB2 provides a common API for all support RDBMS.
Connecting to database
To connect to a database through PEAR::MDB2, you have to create a valid DSN – data source name. This DSN consists in the following parts:
phptype: [...]
