PEAK XOOPS - Re: Randomise display of thumbnails in myalbum index? in englishin japanese

Re: Randomise display of thumbnails in myalbum index?

List posts in the topic

question Re: Randomise display of thumbnails in myalbum index?

msg# 1.1
depth:
1
Previous post - Next post | Parent - Children.1 | Posted on 2006/6/11 5:25
GIJOE  ÀèǤ·³Áâ   Posts: 4110
fully randomize?

just modify ordering condition.

index.php line48:
$prs = $xoopsDB->query( "SELECT l.lid, l.cid, l.title, l.ext, l.res_x, l.res_y, l.status, l.date, l.hits, l.rating, l.votes, l.comments, l.submitter, t.description,c.title AS cat_title FROM $table_photos l LEFT JOIN $table_text t ON l.lid=t.lid LEFT JOIN $table_cat c ON l.cid=c.cid WHERE l.status>0 ORDER BY date DESC" , $num , $pos ) ;

viecat.php line106:
	$prs = $xoopsDB->query( "SELECT l.lid, l.cid, l.title, l.ext, l.res_x, l.res_y, l.status, l.date, l.hits, l.rating, l.votes, l.comments, l.submitter, t.description $select_append FROM $table_photos l LEFT JOIN $table_text t ON l.lid=t.lid $join_append WHERE $where AND l.status>0 ORDER BY {$myalbum_orders[$orderby][0]}" , $num , $pos ) ;

Both should be "rand()".
ORDER BY rand()

Votes:3 Average:6.67

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!