如何在cake php 3中的数据库中使用与表名不同的表名 [英] How to use table name different then in database in cake php 3
本文介绍了如何在cake php 3中的数据库中使用与表名不同的表名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用蛋糕PHP 3.4. 我在数据库中有来宾和国家表. 我想以Guests和Contries的身份访问这些表对象.
I am using cake php 3.4. I have guest and country table in database. I want to access these table object as Guests and Contries.
我想这样使用:
$this->Guests->find();
代替
$this->Guest->find()
推荐答案
您必须创建相同的国家(地区)
这篇关于如何在cake php 3中的数据库中使用与表名不同的表名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文