Can I use group_concat()
function to retrieve image from the database?
Using it the images are displayed as broken because maybe it's not reading image name properly?
$sql="SELECT product.*, group_concat(images.image) as imag FROM product LEFT JOIN images on product.id=images.pid group by product.id";
the loop for displaying image:
foreach(explode('.',$row['imag']) as $url)
{?>
<td><?php $imageURL = 'pictures/'.$url;?>
<img src="<?php echo $imageURL; ?>" alt="" width="100" height="100" /></td>
<?php
}
This is what I'm getting as output: