使用表中的图像显示MySQL数据

I have set up a table that displays data from my SQL database using

 $sql = "SELECT company_id, stk_buy, stk_sell FROM price";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
       echo "<table><tr><th>ID</th><th>Company</th><th>Buying Price</th><th>Selling Price</th></tr>";
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "<tr><td>".$row["company_id"]."</td><td>".$row["stk_buy"]."</td><td>".$row["stk_sell"]."</td></tr>";
    }
    echo "</table>";
   } else {
       echo "0 results";
   }

I want to have images display in the Company column, different ones in each row. Similar to: enter image description hereIs there a possible way of displaying images with my current html table setup or do I have to fetch each row to display images?

You need to fetch the image name from the database, after fetching the images you need to put it inside a <IMG src=""> tag.

The source of the image considering the img as you mention in the comment.

SQL: $sql = "SELECT company_id, stk_buy, stk_sell FROM price";

echo "<tr><td>".$row["company_id"]."</td><td><img src='img/".$row[company_id].".png' style='width:175px;height:75px;'/></td><td>".$row["stk_‌​buy"]."</td><td>".$r‌​ow["stk_sell"]."</td‌​></tr>";

In these query you have not gave the image coloum name.You have to assign image coloum name like this

$sql = "SELECT company_id,image(column name for image) stk_buy, stk_sell FROM price";

First change your query to get image as well from table and then In your echo for table row, add one more td tag with img tag and src of the image to point the path where the image is stored. Something like

echo "<tr><td>".$row["company_id"]."</td><td><img src='./path-to-image/".$row["image-column-name"]."' width='100' height='100'/></td><td>".$row["stk_buy"]."</td><td>".$row["stk_sell"]."</td></tr>";

You can change width and height attributes value to what you want.