mysql order by 字段运算 以及查询 字段goodsid 1,2,3,4 中包含 3
2016-3-17 菜鸟站长
$sql = "select * from `znxfy_user_card` where user_id='$uid' and concat(',',goodsid,',') like '%,$id,%' and unix_timestamp(now())-active_time<=yx_date*24*60*60 and remain_number>0 order by active_time+yx_date*24*60*60-unix_timestamp(now()) desc limit 1";
发表评论: