A way to exclude pets from daycare?
I was wondering if there was a way to exclude pets from the daycare once clicked for the day, I know there is ways to tell if the pet is clicked but I don't know how to exclude it from the query.
|
Maybe you have to add a "wasClicked" attribute to the tables? I did this little crappy code down here, I'm pretty sure it has bugs and maybe it's not the best solution (when I ask for a sizeof of the array it outputs 34 instead of 33, so it's doing extra stuff :D), but hey it's a start... right?
I don't know the documentation of this project, what the functions do etc... I'm pretty new xDWe have to try to find out where to restrict addition of adoptables to the daycare. That's the getConditions() function. The basic idea was to take the IDs that have been clicked and compare the adoptable id to them. This condition is saved in the $conditions variable that will be used when selecting adoptables from owned_adoptables in the function above getConditions() (I believe it's getAdopts()). In the class_daycare, getConditions(), before returning: PHP Code:
I also tried to restrict their appearance (in levelup, in daycare() function) instead of restricting addition, but I don't really know how the page is set up so it was errors after errors. |
That works perfectly! Refeshing is what I meant, and it seems to flow nicely (I also have an upgraded server package so yeah, dunno how well it'd work for free hosters. XD)
|
I love your site so Glad I could help! I really don't know another way other than comparing IDs, but the increasing number of IDs worries me xD Constructing another table not_clicked and selecting from owned_adoptables MINUS selecting from vote_voters, but I really don't know how to work with the date there xD But if it works I'm glad I could help ^^
|
All times are GMT -5. The time now is 05:22 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.