symfony PHPフレームワークpart2 (531レス)
symfony PHPフレームワークpart2 http://medaka.5ch.net/test/read.cgi/php/1268753684/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
261: nobodyさん [sage] 2010/11/15(月) 23:40:15 ID:??? これ、どうゆう意味ですか? > 500 | Internal Server Error | Doctrine_Query_Exception > The root class of the query (alias s) must have at least one field selected. ユーザー毎の売上げを集計したいだけなんだけど。。。 #action.php public function executeSalelist(sfWebRequest $request) { $this->saless = Doctrine_Query::create() ->select('s.user_id as id, p.name, sum(s.amount) as amount') ->from('Sales s') ->leftJoin('s.Profile p') ->groupBy('id') ->execute(); } http://medaka.5ch.net/test/read.cgi/php/1268753684/261
262: 261 [sage] 2010/11/15(月) 23:41:34 ID:??? #schema.yml Sales: tableName: sales actAs: { Timestampable: ~ } columns: user_id: type: integer amount: integer relations: User: class: sfGuardUser foreign: id local: user_id type: many onDelete: cascade foreignType: many foreignAlias: Sales Profile: class: sfGuardUserProfile foreign: user_id local: user_id type: many onDelete: cascade foreignType: many foreignAlias: Sales http://medaka.5ch.net/test/read.cgi/php/1268753684/262
265: 261 [sage] 2010/11/16(火) 13:36:35 ID:??? selectからp.nameをとるととりあえずいける。 Profileがおかしいのかな? Sales: tableName: sales actAs: { Timestampable: ~ } columns: user_id: type: integer amount: integer relations: User: class: sfGuardUser foreign: id local: use_id type: many onDelete: cascade foreignType: many foreignAlias: Sales Profile: class: sfGuardUserProfile foreign: user_id local: user_id type: many onDelete: cascade foreignType: many foreignAlias: Profile http://medaka.5ch.net/test/read.cgi/php/1268753684/265
266: 261 [sage] 2010/11/16(火) 13:38:26 ID:??? sfGuardUserProfile: tableName: sf_guard_user_profile actAs: { Timestampable: ~ } columns: id: integer user_id: type: integer primary: true bank_name: varchar(50) bank_point: varchar(50) bank_type: type: enum values: [ordinary, current] default: ordinary name: varchar(50) bank_number: varchar(50) relations: User: class: sfGuardUser foreign: id local: user_id type: one onDelete: cascade foreignType: one foreignAlias: Profile http://medaka.5ch.net/test/read.cgi/php/1268753684/266
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
1.044s*