function DB () {//Original Way /*$SC = new \home\model\denglumodel (); Var_dump ($SC);*/$a= D ("Denglu"); Var_dump ($a); //use the Quick Method M method$m = m ("Denglu"); //Var_dump ($m); //manipulating Databases$attr = $aSelect(); //querying all data can also give the parameter query a specific return is a two-dimensional array can query multiple data$attr= $afind (); //The argument in parentheses can only write the primary key value to find a specific data based on the primary key value is returned by an array$attr= $awhere("yonghu= ' Zhangsan '"),Select(); //query criteria can be added$attr= $a->table ("Daquan"),Select(); //table to toggle tables to manipulate$attr= $a->alias ("Personnel"),Select(); //you can set the alias of a table$attr= $a->field ("Yonghu"),Select(); //Specify which column of the query is specific$attr= $a->order ("Yonghu"),Select(); //sort by that column$attr= $a->group ()Select(); //Grouping$attr= $a->group ()->having ("Count (*) >5"),Select(); //query by criteria after grouping$attr= $a->join ("Daquan"),Select(); //you can link multiple tables with aliases in fieldVar_dump ($attr); }
TP Framework Controller Model