This question is an exact duplicate of:
https://drive.google.com/file/d/0ByVhijs7bMwjUUZQRHpXUHFvODg/edit?usp=sharing
this s my code
i cant select the product_name and price form two tables"herbs" and "fruits" by using UNION i am a very beginner of php and mysql please help me
$results = $mysqli->query("SELECT * FROM fruits UNION SELECT * FROM herbs WHERE product_code='$product_code' LIMIT 1");
$obj = $results->fetch_object();
</div>