<?php
[color=red]$albumid = 5;[/color]
$result=dbquery(
"SELECT photo_id,photo_title,photo_thumb1 FROM ".$db_prefix."photos
WHERE album_id = $albumid
ORDER BY RAND() LIMIT 1"
);
opentable("Random Photo");
while ($data = dbarray($result)) {
echo "<center><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".PHOTOS."album_".$albumid."/".$data['photo_thumb1']."' title='".$data['photo_title']."' alt='".$data['photo_title']."'></a><br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'>".$data['photo_title']."</a></center>";
}
closetable();
?>
Category Forum
Official Core Support - 6Labels
None yet
Statistics
0 participants
Notifications
You are not receiving notifications from this thread.
Related Questions