4
$sql = "SELECT events.*, leagues.lname as leagueName,leagues.aliasname as AliasName, t1.tname as team1_name, t2.tname as team2_name
FROM events
INNER JOIN leagues ON events.leagueid = leagues.id
INNER JOIN teams AS t1 ON events.teamhid = t1.teamid
INNER JOIN teams AS t2 ON events.teamaid = t2.teamid
WHERE sdate='1352835000' ";
它給表柱:使用附加凡在SQL INNER JOIN
id sdate ... leagueName AliasName team1_name team2_name
我怎麼能添加附加條件:
WHERE AliasName LIKE 'word' AND (team1_name LIKE 'word2' OR team2_name LIKE 'word3')
+1的訂貨! – nawfal