Home >Backend Development >PHP Tutorial >zan-framework mysql connection example tutorial
①Configure the read and write whitelist of the sqlmap connection pool according to the document content
http://doc.zanphp.io/zh/libs/connection_pool.html
Sample code
// demo.demo.demo_sql_id1_1 corresponds to the configuration in resource/demo/sql/demo.php
$result = (yield Db::execute("demo.demo.row_sql_id1_1" , $data));
②Get get, post, request information
There is a built-in function, if you call $ directly in the controller this
Sample code
$request = $this->request->get('content');//Get the request content
The above is the detailed content of zan-framework mysql connection example tutorial. For more information, please follow other related articles on the PHP Chinese website!