Online list ... and a Stats Page for Players
How would I adjust the Online list to show Players in order of who has the most pets?
Also, I'd like to make a stats page for Players ... something simple that just shows their number of pets, in that order, their name, and that sort of thing :) |
Umm, let me think... I don't know how it is with your version, but with mine, I think you'd have to write a code on the online page or something like that that for each user displayed, the code will go to the owned_adoptables table and return the count of all adoptable rows that have an owner that matches the user's name. Then, I remember reading a PHP book that tells you how to count rows and order by value, but I have no clue if that'll work with mysidia.
Another much easier way to do this if your site has no pets, is maybe to add a pet count column in the users table and set it to 0. Then, each time a user adopts a pet, add the number of pets adopted to the value. Then do the order thing. Did that make any sense? |
I do have pets on there, but what code would I use to call it up for the total :)
Sorry I have tried a few times here and failed haha. Thanks for your help ! |
All times are GMT -5. The time now is 12:31 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.