开发者

CakePHP: Need DB table for every controller?

I'm a newbie to CakePHP but got strange error. I'm just testing it, how to implement many functions and got strange error. I have created a controller called about and got the following error:

Error:  Database 开发者_开发知识库table abouts for model About was not found.

Does CakePHP require to have DB table for every single controller?

var $useTable = false; is not working.

I am using CakePHP 1.2.5


Try using this in your controller

var $uses = array();

The $usesTable = false idiom is used in models that don't have associated tables.


you should add about method to your main application controller

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜