[TABLE1]
+----------+-------------------+
| USERNAME | POST |
+----------+-------------------+
| Bob | 'Hi There' |
| Jack | 'Hello' |
| Bob | 'Today is Monday' |
+----------+-------------------+
[TABLE2]
+----------+-----------+
| USERNAME | FOLLOWING |
+----------+-----------+
| Mike | Jack |
| Jack | Bob |
| Bob | Jack |
| Jack | Mike |
+----------+-----------+
我使用這個連接聲明:添加或爲內部連接聲明
SELECT t1.* FROM TABLE1 t1 INNER JOIN table2 t2
ON t1.username = t2.following AND t2.username = 'jack';
這工作,但除了獲得這些結果,我也想加入「OR t1.USERNAME ='傑克';
,然後又OR ..是有辦法做到的加入,但隨後也OR語句
Pleae考慮開始接受答案你的問題再次。你停止這樣做。 – 2012-07-23 10:30:51