Commit 3dd47daf authored by clone's avatar clone

bug

parent 005be235
......@@ -43,8 +43,8 @@ class UAccountBalance extends Model
$where_str .= " and user_id = {$params['user_id']}";
}
$sql = "SELECT * FROM (
( SELECT id, user_id,source_id, money, user_name,create_time, 1 AS is_essay FROM `u_account_balance` WHERE `status` = 0 $where_str) UNION
( SELECT id, user_id,0 as source_id ,money, user_name,create_time, 2 AS is_essay FROM `u_account_check` WHERE `status` IN ( 0, 1, 2 ) $where_str)
( SELECT id, user_id,source_id, money, user_name,create_time, 1 AS is_essay,status FROM `u_account_balance` WHERE `status` = 0 $where_str) UNION
( SELECT id, user_id,0 as source_id ,money, user_name,create_time, 2 AS is_essay,status FROM `u_account_check` WHERE `status` IN ( 0, 1, 2 ) $where_str)
) AS aaa ORDER BY `create_time` DESC LIMIT {$pageNo}, {$pageSize}";
$result = $this->query($sql);
//echo $this->getLastSql();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment