RedBeanPHP

easy ORM for PHP

Setup

So, you have decided to start with RedBeanPHP. The first thing you need to get started is setting up the database. Luckily this is really easy.


    
require('rb.php');
    
R::setup();

Yes, that's all if you are working on a *NIX, Linux or Mac system with SQLite. Here is how to connect to MySQL on any machine:


    
require('rb.php');
    
R::setup('mysql:host=localhost;dbname=mydatabase','user','password');

RedBeanPHP is also very easy to setup for use with PostgreSQL and SQLite.

RedBeanPHP only works with the InnoDB driver for MySQL. MyISAM is too limited.



User contributed notes. Please use the comment section to provide tips, notes and examples. To ask for support or to provide feedback use the forum. For bug reports use Github Issue Tracker.

Site comments powered by Disqus

page generated in 0.010714054107666 sec.