Home >Backend Development >PHP Tutorial >ZF framework's db class select query join linked list usage example_PHP tutorial

ZF framework's db class select query join linked list usage example_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:35:541022browse

This article mainly introduces the example of using the Db class select query join linked list of the zf framework. Friends in need can refer to it

Example of using zend framework's query join() linked list ​ The code is as follows: '127.0.0.1' , 'username' => 'root' , 'password' => '111' , 'dbname' => 'test', 'profiler' => "true" ); //Tell the Zend_Db class the database and database configuration information operated by $Db = Zend_Db::factory('PDO_Mysql' , $Config); //Execute encoding statement $Db -> query("set names utf8"); //-------------------------------------------------- $Select = $Db ->select(); $Select -> from('sanguo','*'); $Select -> join('dengji','sanguo.s_dengji = dengji.d_id'); $Select -> order('s_dengji asc'); $Reslut = $Db -> fetchAll($Select); echo ""; foreach ($Reslut as $key => $value) { echo ""; foreach ($value as $key2 => $value2) { echo ""; } echo ""; } echo "
" . $value2 . "
"; ?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/741818.htmlTechArticleThis article mainly introduces the Db class select query join linked list usage example of the zf framework. Friends who need it can refer to it. The sample code for using the zend framework's query join() linked list is as follows:?php//Introduction...
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