TP5联表查询

浏览:7476 发布日期:2018/04/02 分类:ThinkPHP5专区 关键字: 联表查询
$sqlwhere.=" AND ((Match_ID in (select match_id from mydata1_db.k_bet where match_coverdate>='$begin_time' and match_coverdate<='$end_time'))";
$sqlwhere.=" OR (Match_ID in (select match_id from mydata1_db.k_bet_cg where match_endtime>='$begin_time')))";
}

$sql = "SELECT ID,Match_ID, Match_Date, Match_Time, Match_Master, Match_Guest,Match_Name,MB_Inball,TG_Inball,MB_Inball_HR,TG_Inball_HR,match_sbjs FROM Bet_Match where match_js=0 and (match_date='$page_date' or match_date='$page_date2') ".$sqlwhere." order by Match_CoverDate,Match_Name,Match_Master,iPage,iSn desc";

这个怎么做联表查询呀?有大大帮帮忙么
最佳答案
评论( 相关
后面还有条评论,点击查看>>