Home  >  Article  >  Backend Development  >  zan-framework mysql connection example tutorial

zan-framework mysql connection example tutorial

零下一度
零下一度Original
2017-06-23 13:52:24969browse

①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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn