<?PHP//introducing the RB entry file include_once' Rb.php '; //define DSN and related data $dsn= ' Mysql:host=localhost;dbname=hwibs_model '; $user= ' Root '; $pass= ' '; $table= ' link '; //Link DatabaseR::setup ($dsn,$user,$pass); //Linked Data TablesR::d ispense ($table); //exec:: Execute an SQL statement directly [do not need a linked table to use] [parameter 2 binding function as find, no longer repeat]//note, here is generally applicable to adding and removing changes, the query will only return the number of records, and will not return the record itself [if you want to query and return the record itself, Need to use GetAll] $result= R::exec("SELECT * FROM Link"); //GetALL:: The difference between this function and the load or find is that it only returns the data itself and returns it in a multidimensional array [even if you TM is a record] $result= R::getall ("SELECT * from link where id =?",Array(4));//small use of the binding function//getrow:: This function is the same as the above getall, the difference he just return a single line, similar to FindOne, the difference is that the single-dimension array is returned $result= R::getrow ("Select URL from link"); //Getcol:: Legend gets a single column of data [that is, one field]//1. Note that if the field collection is * or multiple columns, the first column is taken anyway, so this function is only available when you need to take the value of a field//2. Of course, it can take multiple rows, but only one column $result= R::getcol ("Select URL from link"); //Getcell:: This is the same as the above, the difference is that the second, it can only take the first row of the field value of the column [for accurate data acquisition use] $result= R::getcell (' Select URL from link '); //Getassoc:: This method is interesting; it only supports data return for two field columns, the first field value as the key, and the second field value as the value to return//1. The return data is a one-dimensional array $result= R::getassoc ("Select Url,name from Link"); //Getassocrow:: I just can't figure out what's different about this function and the TM GetAll . $result= R::getassocrow ("SELECT * from link where id = 3"); //Converttobeans: This is a function that will use the data found in addition to the load or Find method and convert it to Redbaan's own object format//1. At least as far as the current understanding is concerned, it can be used to delete an operation//2. Parameter 2 is at least a one-dimensional array, and just returning a value like Getcell cannot be converted. $beans= R::converttobeans ($table,$result); Print_r($beans);//Output?>