纠结的SQL

今天要查出一个统计列表,但又有时间条件,条件就是最后更新的一次为准确值,结果就冒出这么一段SQL出来了。还好, … Read more

mysql left join查询

SELECT * FROM `_bidding_tb` as `db` , `_member` AS dm LEFT JOIN `_member_emcee` AS de ON dm.mid = de.mid LEFT JOIN `_member_person` AS dp ON dm.mid = dp.mid WHERE dm.mtype<>'企业' AND `db`.`mid` = `dm`.`mid` AND `db`.`aid` = 221
SELECT fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores FROM `_feedback` fb left join `_member` mb on mb.mid = fb.mid where fb.aid='$aid' and fb.ischeck='1' order by fb.id desc limit 0, 50

Read more