This is an outdated version of the Manual. Visit the NEW Manual

Compatible

RedBeanPHP has fluid and frozen mode support for:

MySQL 5 and higher
SQLite 3.6.19 and higher
PostgreSQL 8 and higher
CUBRID (since 3.2)

To connect to a databases use:


    R
::setup('mysql:host=localhost;dbname=mydatabase',
        
'user','password'); //mysql

    R
::setup('pgsql:host=localhost;dbname=mydatabase',
        
'user','password'); //postgresql

    R
::setup('sqlite:/tmp/dbfile.txt',
        
'user','password'); //sqlite

Since 3.2:


    R
::setup('cubrid:host=localhost;port=30000;
        dbname=mydatabase'
,
        
'user','password'); //CUBRID

To disconnect use: R::close(); (since 3.1)


 
 

RedBeanPHP Easy ORM for PHP © 2024 Gabor de Mooij and the RedBeanPHP community - Licensed New BSD/GPLv2