View Single Post
  #6  
Old 01-23-2010, 12:07 AM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 20,881
Seapyramid
Default RE: Random Adoptables

this is the sql call I use

PHP Code:
 SELECT a.code,b.primaryimage FROM ".$prefix."adoptables AS a JOIN ".$prefix."levels AS b ON b.type=a.type AND a.whenisavail !='promo' AND a.whenisavail !='mystery' AND a.shop=b'0' AND a.grlelevel <= '$group' AND b.thisislevel=0 ORDER BY RAND() LIMIT 8"; 
My code is now greatly optimized from the original.. so you will have to understand some php to break it down.. but thats what I use.
Reply With Quote