Without showing your code and database. I assumed that you are working with php and mysql.
I have run and tested this code and it works. that means it will work for you. my connection is PDO. Give me a shout if are still having issues
<?php
// pdo connection
$db = new PDO (
'mysql:host=localhost;dbname=sectona_db;charset=utf8',
'root', // username
'root90' // password
);
?>
<?php
Echo 'Data Output:<br>';
include("pdo.php");
$result = $db->prepare("SELECT * FROM product where id='123'");
$result->execute(array());
while ($r = $result->fetch())
{
//$data = htmlentities($r['product'], ENT_QUOTES, "UTF-8");
?>
<?php echo htmlentities($r['product'], ENT_QUOTES, "UTF-8");?>,
<?php } ?>