I have one table that I need to pull data from to display. there are two fields that a user's id can be attached to. Field1 and Field2, but they are always either or. In addition, I have a couple of extra where clauses in my query. My experience in the past is that you cannot have
Where field1= user_id
or where field 2= user_id
Order by field 3;
Can I try this:
where field 1or field 2 = user_id
order by field 3.
I am not aware if this is possible. If so, can you show me how?
If not, I think I have create two queries. One that gets field 1in the where and the other with field 2. Then I would combine the two arrays, then sort by field 3.
I think this way is the way I am gonna haveto go. My problem is that I am very weak in working with arrays. Can someone please help me put the two mysql_results into 1 array and then sort it? I will probably need assistance in retrieving the data. I know how to do it with:
while (mysql_fetch array())
If you have any questions or need more info, let me know.