I have two queries which I need to combine.
Both are of the form
SELECT *
FROM table
WHERE
a=1 AND b=2..etc
Both are selecting the same fields from the same table and differ in only one part of the where clause.
The result is then used in a while loop
while($getresult = mysql_fetch_array($results))
I tried to combine them using a UNION statment but that doesnt seem to be working. I then tried to combine the two results arrays using merge_array but this doesnt work either. Both return an error saying the arugment supplied for mysql_fetch_array is not a valid mysql result.
I have tried both queries independantly and they work fine.
Is there a way to combine the results? The only way I can think of is to loop through the two arrays and put them into another array? This seems very long winded though.