View Single Post
Old March 3rd, 2006, 07:41 PM   #5 (permalink)
cwallace
Junior Member
Verified Customer
 
Join Date: Dec 2004
Location: So Cal USA
Posts: 10
(editing what I wrote originally)

I found the spot where there is similar code, but it's not exactly what you posted. Here's what I have:

default:
if ( !isset($cat) || empty($catquery) ) {
$group_title = "{$Globals['pp_lang']['random']}";
$query = "SELECT id,user,userid,cat,storecat,title,bigimage,views,height,width, id*0+RAND() as rand_col FROM {$Globals['pp_db_prefix']}photos WHERE approved='1' $exclude_cat ORDER BY rand_col DESC";
break;
}
else {
$group_title = "{$Globals['pp_lang']['random']} - $catname";
$query = "SELECT id,user,userid,cat,storecat,title,bigimage,views,height,width, id*0+RAND() as rand_col FROM {$Globals['pp_db_prefix']}photos WHERE approved='1' $userq $exclude_cat AND cat in ($catquery) ORDER BY rand_col DESC";

-----------------------

There's no 'LIMIT $grabnum";' stuff - so I'm not sure where to put the code you gave.

Sorry - I'm (obviously) not good with code and do REALLY appreciate your time!

Last edited by cwallace; March 3rd, 2006 at 08:09 PM.
cwallace is offline   Reply With Quote