Kristoff1875 Posted May 27, 2013 Share Posted May 27, 2013 Currently lay in bed and it just popped in to my head (sad I know!) I'm not sure how I'd go about having featured items... If you've got a pagination showing 10 items per page, would it be possible to call everything from the "Male" (for example) column and then have the top 3 rows on each page random entries where they have the required value in the Featured column? Quote Link to comment Share on other sites More sharing options...
Solution requinix Posted May 27, 2013 Solution Share Posted May 27, 2013 Sure: do 3 items with this random stuff and then only 7 items per page of the normal paginated stuff. Quote Link to comment Share on other sites More sharing options...
Kristoff1875 Posted May 27, 2013 Author Share Posted May 27, 2013 So make 2 different calls to the database? I thought there may be a more efficient way of doing it all in 1 call? Quote Link to comment Share on other sites More sharing options...
requinix Posted May 28, 2013 Share Posted May 28, 2013 Could use a UNION but it's still essentially two queries. Quote Link to comment Share on other sites More sharing options...
Kristoff1875 Posted May 28, 2013 Author Share Posted May 28, 2013 Ok cheers, have done it, works well, I think! Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.