【问题标题】:Create temp table in cakephp select在 cakephp 选择中创建临时表
【发布时间】:2014-09-16 16:26:11
【问题描述】:

有人知道如何在 cakephp 中为这种查询创建模型吗?

select * from (select a,b,c from table1 where a = 'something') as table_alias group by b;

其中内表是一个临时表,我仍然可以在其中传递一些条件数组(而不是使用 ->query() 函数)。

提前致谢!

【问题讨论】:

  • 如果您使用的是 MySQL,请为临时表创建一个 VIEW。然后,您可以尝试将该 VIEW 与模型一起使用。

标签: php cakephp cakephp-model


【解决方案1】:

【讨论】:

    猜你喜欢
    • 2010-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-09
    • 1970-01-01
    相关资源
    最近更新 更多