导出原始sql 在linux 上执行没有任何问题
try{
$t=$table->alias('d')->field($field);
if(!empty($condition)){
if(isset($condition['where'])&&!empty($condition['where']))
$t->where($condition['where']);
if(!empty($whereOr)){
$t->whereOr(function($query) use ($whereOr){
$query->where($whereOr);
});
}
if(isset($condition['order'])&&!empty($condition['order']))
$t->order($condition['order']);
$t->limit(($page-1)* $limit,$limit);
}
$result= Collection($t->select())->toArray();
}catch(\Exception $e){
$this->code=-1;
$this->msg=$e;
return $this->output();
}catch(\Error $e){
$this->code=-1;
$this->msg=$e;
return $this->output();
}
if(empty($result)){
$this->code=-2;
}
else{
$this->data=$result;
}
return $this->output();
}生成的sqlSELECT * FROM `de_dispute` `d` WHERE `seller_response_due_date` BETWEEN 1 AND 1536076799 AND `status` = 'WAITING_FOR_SELLER_RESPONSE' AND `is_reply` = 1 OR ( `seller_response_due_date` BETWEEN 1 AND 1536076799 AND `status` = 'OPEN' AND `is_reply` = 1 AND `dispute_life_cycle_stage` = 'CHARGEBACK' ) ORDER BY `reply_status` asc,`seller_response_due_date` asc LIMIT 0,50
大神求助??????????????
最佳答案