Code:
ORDER BY RAND()
02. don't post crazy replies without reading the whole thread!
$countpics = mysql_num_rows(mysql_query ("SELECT * FROM ibwf_usergallery WHERE
uid='".$who."'")); echo "<a href=\"usergallery.php? action=viewuserphoto&who= $who&sid=$sid\">MY GALLERY</a>('.$countpics.')<br/ >";
ORDER BY RAND()
echo "<p><a href='gallery2.php?action=viewuserphoto&who=$who'>";
$items= mysql_query("SELECT `imageurl` FROM `ibwf_usergallery` where `uid`='$who' ORDER BY RAND() LIMIT 3");
while ($pic = mysql_fetch_array($items))
{
echo "<img alt='Loading...' src='phpthumb.php?image=$pic[0]' width='30' height='30'>";
}
echo "</a></p>";
$countpics = mysql_fetch_array(mysql_query("SELECT * FROM ibwf_usergallery WHERE uid='".$who."'"));
echo "<a href=\"usergallery.php?action=viewuserphoto&who=$who&sid=$sid\">MY GALLERY</a>($countpics[0])<br/>";
$countpics = mysql_fetch_array(mysql_query("SELECT * FROM ibwf_usergallery WHERE uid='".$who."'"));
echo "<a href=\"usergallery.php?action=viewuserphoto&who=$who&sid=$sid\">MY GALLERY</a>($countpics[0])<br/>";
$countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_usergallery WHERE uid='".$who."'"));
echo "<a href=\"usergallery.php?action=viewuserphoto&who=$who&sid=$sid\">MY GALLERY</a>($countpics[0])<br/>";
Leave a comment: