<?PHPrequire_once' Rb.php '; $tableName= ' link '; //connecting to a databaseR::setup (' Mysql:host=localhost;dbname=hwibs_model ', ' root ', '); //Link TableR::d ispense ($tableName); //1. Get the object record handle, and if you cannot use load without an ID, you can use the Find method to find $result= R::find ($tableName, ' ID > 4 ');//normal use of//2. Find provides richer extensibility, customization, and self-SQL combinations relative to load $result= R::find ($tableName, ' is_my_name is not null ');//use the NOT NULL//3. Binding capability is used $result= R::find ($tableName, ' id =? or id =? ',Array(4,5));//using the BIND function, the binding parameter is an array of 1,2,3,4 .... 4. Use FindOne to query the first data [and return only one object, not an array] $result= R::findone ($tableName, ' ID < ORDER BY ID ASC ');//query only 1 records [after sorting by id]//5. Use FindAll to query all data for this table [if the second condition parameter is empty, otherwise it will be retrieved from conditional SQL, returning the array] $result= R::findall ($tableName, "id=4");//query all data//6. Can use the name slot function [In fact personally think that the advantage is that it can not need to be bound with binding, write dead order, others, did not find any benefits] $result= R::find ($tableName, ' id =: ID ',Array(': id ' =>4));//Using named Slots Print_r($result);//Output Viewing results?>