$sql = 'SELECT c.card_id,c.bg,c.diybg,m.name,c.discount,cl.id as cardid,cl.card_money,cl.card_money_give,m.pic_info,m.mer_id FROM '
.C('DB_PREFIX').'card_userlist `cl` left join '
.C('DB_PREFIX').'card_new `c` on cl.card_id = c.card_id left join '
.C('DB_PREFIX').'merchant m on c.mer_id = m.mer_id WHERE ( cl.uid = '.$uid.' ) ';
$res = M('')->query($sql);