从没有模型cakephp的表中检索数据

时间:2022-01-11 00:06:24

How to retrieve data from table that has no model? For example, I want to retrieve data from acos_Aros table so I can check the checked box that has _delete | _update | _view | _create is set to 1

如何从没有模型的表中检索数据?例如,我想从acos_Aros表中检索数据,以便检查具有_delete |的复选框_update | _view | _create设置为1

Any help?? thanks in advance.

任何帮助?提前致谢。

1 个解决方案

#1


2  

Just make a model. Voila. (seriously)

做一个模型。瞧。 (严重)

Or, you can use any Model's query() method (doesn't have to be on the correct model) - it allows you to run a manually entered MySQL query.

或者,您可以使用任何Model的query()方法(不必在正确的模型上) - 它允许您运行手动输入的MySQL查询。

Eg.

例如。

$arosAcosData = $this->AnyModel->query("SELECT * FROM acos_aros");

#1


2  

Just make a model. Voila. (seriously)

做一个模型。瞧。 (严重)

Or, you can use any Model's query() method (doesn't have to be on the correct model) - it allows you to run a manually entered MySQL query.

或者,您可以使用任何Model的query()方法(不必在正确的模型上) - 它允许您运行手动输入的MySQL查询。

Eg.

例如。

$arosAcosData = $this->AnyModel->query("SELECT * FROM acos_aros");