fchaose / qeephp

Automatically exported from code.google.com/p/qeephp
0 stars 0 forks source link

QDB_Select 的聚合方法和 columns() 方法连用后,导致SQL出错 #98

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

{{{
$agents = Shop::find('id = ? AND [agent.orderstatus] = 0', $shop_id)
                ->sum('money', 'money_sum')
                ->columns()
                ->getAll();

}}}

生成的 SQL 为:

{{{
SELECT `llq_shop`.* SUM(`llq_order`.`money`) AS money_sum ....
}}}

字段名之间缺少逗号

Original issue reported on code.google.com by dualf...@gmail.com on 12 Jan 2009 at 8:48

GoogleCodeExporter commented 8 years ago
T_T

Original comment by yunting...@gmail.com on 22 Feb 2009 at 3:45