I’m new to PHP+MySQL programming
I want to SELCET data using tow constrain at once,
the cons1 is
Tid=user02 and Fid=user01
and cons2 is
Tid=user01 and Fid=user02
the data I want to output is something like:
$result1 = mysql_query("SELECT * FROM myTable WHERE Tid='user02' AND Fid='user01');
+
$result2 = mysql_query("SELECT * FROM myTable WHERE Tid='user01' AND Fid='user02');
= what I want
can it be done in single line?
or can make a result which stored $result1 and $result2
thanks for taking time reading my question
You can
ORthe two conditions resulting in a single query: