本文介紹了CakePHP 中的模型可以有多個表嗎?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
在 CakePHP 中一個模型可以有多個表嗎?
Can a model have multiple tables in CakePHP?
推薦答案
從手冊中的這句話猜測:
Guessing from this sentence in the manual:
模型通常是數據庫的訪問點,更具體地說,是數據庫中某個表的訪問點.默認情況下,每個模型都使用名稱為自己復數形式的表,即用戶"模型使用用戶"表.
A model is generally an access point to the database, and more specifically, to a certain table in the database. By default, each model uses the table who's name is plural of its own, i.e. a 'User' model uses the 'users' table.
我不這么認為,但你可以建立關系,也許這就是你所需要的.
I don't think so, but you can make relationships maybe thats what you need.
檢查這個
這篇關于CakePHP 中的模型可以有多個表嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!