Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Show amounts and totals of adoptables (http://www.mysidiaadoptables.com/forum/showthread.php?t=5342)

Chaos77777 01-21-2017 01:30 PM

Say if I have a Bengal type tiger and a Bengal type cat. It shows there's one. Because they're both Bengal. It disregards the subtype "tiger" and "cat"

I derped, lol. I didn't realize you removed the fetch unique pdo. Thanks so much, it does work, I tested it by changing around types and subtypes

IntoRain 01-21-2017 02:00 PM

Quote:

I derped, lol. I didn't realize you removed the fetch unique pdo. Thanks so much, it does work, I tested it by changing around types and subtypes
Oh, good. I was getting confused because I added an European Cat and it was counting 5 lol

https://i.imgur.com/lAJMMff.png

There was also the option to add a CONCAT if it didn't work, so it would be okay xD

Glad it worked out in the end! And yeah, the GROUP BY makes groups by the combination of those two columns, merging the two columns, so there was no need for fetch_unique this time!

Chaos77777 01-21-2017 02:04 PM

I'll make sure to remember that. Thanks a bunch!

Chaos77777 01-21-2017 03:16 PM

Welp, I noticed that the shop and pound only takes from the type, not the subtype (Also the owner reward too, from my last post). If I have a Bengal Cat and a Bengal Tiger (Both of which cost different amounts), it costs the same amount to pound it and it only gives the owner the same reward as the Bengal Cat, I'm assuming because it was made first. Any idea where I'd go to change that around?

Chaos77777 01-21-2017 04:18 PM

Freakin A! I got it! Before I go on though I want a more expert opinion.
In class_stockadopt
I changed
$row = $mysidia->db->select("adoptables", array(), "type ='{$adopttype}'")->fetchObject();

to

$row = $mysidia->db->select("adoptables", array(), "id ='{$adopttype}'")->fetchObject();

And in class_adoptshop

I changed

foreach($this->adopts as $stockadopt){
$adopt = $this->getadopt($stockadopt->type);

to

foreach($this->adopts as $stockadopt){
$adopt = $this->getadopt($stockadopt->id);



-edit-
That got the right details to show in the shop and pound but
Trying to actually buy it

An error has occurred.

The adoptable specified is invalid...

Boooooooooooo

Chaos77777 01-21-2017 08:32 PM

I did a workaround and named the types slightly different atm.
If you'd like, you can check out my site
http://arconline.x10host.com

:( Yeah, I made a dumb@ss typo at the start lol, I'll worry about fixing it later though


All times are GMT -5. The time now is 06:28 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.