Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2017, 11:05 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,678
Dinocanid is on a distinguished road
Default Cannot view last pet

One of my users reported not being able to view/manage their last pet, and clicking the next page pagination just shows the last pet from the first page. (They have 16, but can only see 15) The pet they can't see is their favorite/active pet if that helps.
PHP Code:
    public function index(){
        
$mysidia Registry::get("mysidia");
        
$total $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}'")->rowCount();
        
$pagination = new Pagination($total10"myadopts");
        
$pagination->setPage($mysidia->input->get("page"));    
        
        
//Attempting to sort!
        
$sort $mysidia->db->select("users_options", array("petsort"), "username = '{$mysidia->user->username}'")->fetchColumn();
            switch (
$sort){
    case 
'clicks'
        
$stmt $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' ORDER BY totalclicks LIMIT {$pagination->getLimit()},{$pagination->getRowsperPage()}");
        break;
    case 
'gender'
        
$stmt $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' ORDER BY gender LIMIT {$pagination->getLimit()},{$pagination->getRowsperPage()}"); 
        break;
    case 
'level'
        
$stmt $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' ORDER BY currentlevel LIMIT {$pagination->getLimit()},{$pagination->getRowsperPage()}");
        break;
    case 
'name'
        
$stmt $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' ORDER BY name LIMIT {$pagination->getLimit()},{$pagination->getRowsperPage()}");
        break;
}
        
        
//Sorting ends here!
        
$this->setField("pagination"$pagination);
        
$this->setField("stmt", new DatabaseStatement($stmt));
    } 
(myadopts.php)
Continued in next post...
__________________
Reply With Quote
  #2  
Old 06-28-2017, 11:29 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,096
parayna is on a distinguished road
Default

I think sometimes what happens is with the sort feature it randomises the pets on each page (so sometimes some pets that were on the previous page also appear on the next page). Maybe check what sort they have, and if it's clicks how many clicks the pet they can't see has (in comparison to the pet they can see). I've figured that the levels and clicks sort both have that problem but the name one doesn't (as usually pets don't have the same name, maybe?)
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.

Reply With Quote
  #3  
Old 06-28-2017, 12:36 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,678
Dinocanid is on a distinguished road
Default

Yeah, it looks like that's probably it. I ran into a similar problem when sorting by level and gender, but not clicks and name. They have their sort set to clicks now, but it could've been set to something else when they reported it.
__________________
Reply With Quote
  #4  
Old 06-28-2017, 12:40 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,096
parayna is on a distinguished road
Default

Hmm... I have the issue when it's set to clicks o.O (If more than one pet has the same amount of clicks, they'll sometimes swap places.. get's noticeable when it transfers across pages lol)
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.

Reply With Quote
  #5  
Old 06-28-2017, 01:35 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,678
Dinocanid is on a distinguished road
Default

They replied back and said that there's always a pet missing no matter how they sort their pets.
Quote:
The pets that vanish changes however you sort the pantry but it always seems to be replaced with a duplicate of the cheese egg for the mouse.
(direct quote)
__________________
Reply With Quote
  #6  
Old 06-28-2017, 01:36 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,096
parayna is on a distinguished road
Default

Hmm that's odd o.O I haven't really been able to duplicate it on Foodbabs but I do have like 29 pets now so it's a little hard to really see if one appears more than once or not at all... :/
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.

Reply With Quote
  #7  
Old 06-29-2017, 10:51 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,678
Dinocanid is on a distinguished road
Default

I clicked through the sorting options a bunch of times each and yeah, it seems to randomize which pets appear on what page sometimes which can lead to some pets being missed. I never ran into the problem before when it was always ordered by clicks, but now choosing to order by clicks makes it random o.0
This is just really wierd.
__________________
Reply With Quote
  #8  
Old 06-29-2017, 11:53 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,096
parayna is on a distinguished road
Default

It is... it also happens on my site o.O (But I have 30 pets being shown per page, so it probably won't be too much of an issue at the beginning lol)

I don't know how you'd make it not random, unless you specified what order each adoptable owned by that person specifically appeared in... (which would probably be so much work and not very practical in the long run)
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.

Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:25 PM.

Currently Active Users: 456 (0 members and 456 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636