I have two tables each with a field we will call widgetid.
I need to run a query on both tables, that will return a single list of widgetid’s from both tables.
I have no idea how to do this.
What i have now is:
$result = mysql_query("SELECT * FROM `inventory` WHERE find_in_set('$serial', items)") or die(mysql_error());
while($row = mysql_fetch_array($result)){
foreach($row AS $key => $value) { $row[$key] = stripslashes($value); }
$widgetid = $row['widgetid'];
//Do Stuff For Each WidgetID
}
Now i need to take that same $serial, and search the second table for its list of widgetid’s. But i need to still be able to “do stuff” in the same place, with both lists of widgetids as one
Is that what you are looking for? This will combine two select querys and give you it as a single result.