PDA

View Full Version : Problem with adopt with most clicks


Dinocanid
02-25-2017, 10:49 AM
I've run into an odd problem where the adoptable with the most clicks will pick my adoptable, when it shouldn't be. Like this:

$topclicks = $mysidia->db->select("owned_adoptables", array("totalclicks"), "Type='{$species}'", "1 ORDER BY totalclicks DESC LIMIT 1")->fetchColumn();
$topadopt = $mysidia->db->select("owned_adoptables", array("name"), "Type='{$species}'", "1 ORDER BY totalclicks DESC LIMIT 1")->fetchColumn();
$topadoptowner = $mysidia->db->select("owned_adoptables", array("owner"), "Type='{$species}'", "1 ORDER BY totalclicks DESC LIMIT 1")->fetchColumn();
(The code that's showing my pet)
This should get the information of the adoptable with the most clicks, but it seems to only pick my adoptable, which doesn't have the most clicks. What's weird about it is that there's other identical code in the script that works correctly, but this one strangely does not. Maybe I need another pair of eyes to spot the difference, if there is one:
$topclicks = $mysidia->db->select("owned_adoptables", array("totalclicks"), "Type='{$species}'", "1 ORDER BY totalclicks DESC LIMIT 1")->fetchColumn();
$topadopt = $mysidia->db->select("owned_adoptables", array("name"), "Type='{$species}'", "1 ORDER BY totalclicks DESC LIMIT 1")->fetchColumn();
$topadoptowner = $mysidia->db->select("owned_adoptables", array("owner"), "Type='{$species}'", "1 ORDER BY totalclicks DESC LIMIT 1")->fetchColumn();
(The code that works)

Hall of Famer
02-27-2017, 08:10 AM
I see. If you believe this is a glitch with the official Mysidia Adoptables code, plz post it in the Bugs Tracker. I will take a look and see what can be done with it.