SELECT COUNT(*) AS tp_count FROM fh_joinactivity as a INNER JOIN fh_activity as b on b.a_id = a.a_id WHERE a.u_id = 1 AND a.is_read = 0 AND b.a_time < 148655623...
1. 多表查找一条数据1M('a表')->join("b表 on b表.id=a表.id")->where('条件')->find();2.查找一条数据1M('a表')->where('条件')->find();3.多表查询所有数据1M('a表&...