Home > php教程 > php手册 > body text

解决Model不能定义联合主键的问题

WBOY
Release: 2016-06-07 11:44:05
Original
1464 people have browsed it

在API文档未发现相应定义联合主键的方式.
/*<br>  * Dream!网站后台管理系统<br>  * @todo 权限与菜单关系表数据模型<br>  * @author Msj <br>  * @copyright 9393103.com<br>  * @version 1.0<br>  * @since 2013-8-26<br>  */<br> defined('THINK_PATH') or exit();<br> class AuthGroupMenuModel extends MsjModel{<br>    //联合主键定义<br>    protected $fields = array(<br>             'group_id',<br>             'menu_id',<br>             '_autoinc' => false,<br>             '_pk' => 'menu_id',<br>             '_type' => array (<br>                     'group_id' => 'mediumint(8) unsigned',<br>                     'menu_id' => 'mediumint(8) unsigned'<br>             )<br>     );<br> }本文出自 PHP@妖孽,转载时请注明出处及相应链接。
本文永久链接: http://www.9393103.com/?p=145
解决Model不能定义联合主键的问题

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template