Let's say that I have the following 4 tables in my database:

users (id, username)
products (id, name, image)
selling (sellid, productid, price)
sold (userid, productid, sellid)

I want so select the first 5 rows from the "sold" table and to retrieve the username, the product name, the product image and the product price.

The username will be retrieved by comparing sold.userid with users.id.

The product name will be retrieved by comparing sold.productid with products.id and taking the name.

Same for the product image.

And the product price will be retrieved by comparing sold.sellid with selling.sellid and taking the price.

What would be the MySQL code for retrieving the 5 rows with the appropriate information and the PHP code to echo this information ?

Thank you.