how to print 30 random images and image name from database width out repeating same images?
database: image
image_id
user_id
image(image store here blob)
iam thinking some thing like this but not sure
i = 0;
while(i > 31)
$queryget = mysql_query("SELECT image_name FROM user WHERE username = '$user'") or die("query didnt work");
$row = mysql_fetch_assoc($queryget);
$image_name_db = $row['image_name'];
$image = mysql_query(SELECT image FROM image ORDER BY productID DESC LIMIT 10);
$src = 'data:image/gif;base64,' . $image;
<img src=\"$src\" height='30%' width='30%'/>
i++