Description
This example shows us how to PHP with SmartClient framework.
...
To install
After unzipping the RedBeanPHP, you will see just the rb.php.
This file contains everything you need to start RedBeanPHP. Just include it in your PHP script like this:
Code Block language php require 'rb.php';
You are now ready to use RedBeanPHP!
To 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.
Code Block language php require('rb.php'); R::setup('mysql:host=localhost; dbname=mydatabase','user','password');
InnoDB only
Info RedBeanPHP only works with the InnoDB driver for MySQL. MyISAM is toolimited.
Queries
Queries
Code Block language php R::getAll( 'select * from supplyitem' );
Info title Note: RedBeanPHP only works with the InnoDB driver for MySQL. MyISAM is toolimited.
How to build the project with PHP?
...
Open the web browser and call the url, the application will start and a grid fetching and displaying the rows found in the table will be shown.
Date fields are correctly displayed, and if null, are missing from the grid.
...