Hi there,
For some reason, I have two product tables which have exactly the same fields.
Table Products1 -> ID, name, description
Table Products2 -> ID, name, description
I would like to be able to run a query on both tables at the same time.
I tried something like « SELECT p.id, p2.id FROM products p, products2 p2 » but I dont get the expected results.
What I would like to do is to make 2 different queries:
$query1 = mysql_query(« SELECT id FROM products ») ;
$query2 = mysql_query(« SELECT id FROM products2 ») ;
But now how to combine these 2 queries so that I can run the mysql_fetch_array() function on both queries at the same time ?
Is there a way to « add » these 2 queries ?
Thanks in advance
Bruno
PS : I did the following which works :
while ($array = mysql_fetch_array($query1) OR $array = mysql_fetch_array($query2)){
…
}
BUT I need to combine both queries BEFORE…