When combining tables to make one big table, you need to have a common column to pair with which in your case appears to be the column named "code". A tutorial can be found at http://www.tizag.com/mysqlTutorial/mysqljoins.php and below is a query example:
SELECT *
FROM fruit, cart
WHERE fruit.code = cart.code