fix select field list
This commit is contained in:
parent
aad314491b
commit
c003a6b23a
1 changed files with 2 additions and 3 deletions
|
@ -220,9 +220,8 @@ class MainController extends AppController {
|
||||||
if (isset($claim->publisher) || $claim->claim_type == 1) {
|
if (isset($claim->publisher) || $claim->claim_type == 1) {
|
||||||
// find more claims for the publisher
|
// find more claims for the publisher
|
||||||
$moreClaimsQuery = $this->Claims->find()->select([
|
$moreClaimsQuery = $this->Claims->find()->select([
|
||||||
'claim_id', 'bid_state', 'price', 'fee', 'fee_currency', 'is_nsfw', 'claim_type',
|
'claim_id', 'bid_state', 'fee', 'fee_currency', 'is_nsfw', 'claim_type', 'name',
|
||||||
'name', 'title', 'description', 'content_type', 'language', 'author', 'license',
|
'title', 'description', 'content_type', 'language', 'author', 'license', 'content_type'
|
||||||
'content_type'
|
|
||||||
])->select(['publisher' => 'C.name'])->leftJoin(['C' => 'claim'], ['C.claim_id = Claims.publisher_id'])->where(['Claims.claim_type' => 1, 'Claims.id <>' => $claim->id, 'Claims.publisher_id' => isset($claim->publisher) ? $claim->publisher_id : $claim->claim_id])->limit(9);
|
])->select(['publisher' => 'C.name'])->leftJoin(['C' => 'claim'], ['C.claim_id = Claims.publisher_id'])->where(['Claims.claim_type' => 1, 'Claims.id <>' => $claim->id, 'Claims.publisher_id' => isset($claim->publisher) ? $claim->publisher_id : $claim->claim_id])->limit(9);
|
||||||
if (isset($claim->publisher) && $claim->publisher->claim_id !== 'f2cf43b86b9d70175dc22dbb9ff7806241d90780') { // prevent ORDER BY for this particular claim
|
if (isset($claim->publisher) && $claim->publisher->claim_id !== 'f2cf43b86b9d70175dc22dbb9ff7806241d90780') { // prevent ORDER BY for this particular claim
|
||||||
$moreClaimsQuery = $moreClaimsQuery->order(['Claims.fee' => 'DESC', 'RAND()' => 'DESC']);
|
$moreClaimsQuery = $moreClaimsQuery->order(['Claims.fee' => 'DESC', 'RAND()' => 'DESC']);
|
||||||
|
|
Loading…
Reference in a new issue