View Full Version : sort adoptables
Blackmagic
12-01-2009, 03:04 AM
Hello together,
is it possible, to programm, that the user could sort the adoptables in their favorite order?
or alternate sort by names, levels or adoption-day?
greetings
Arianna
12-01-2009, 09:05 AM
Hmm - well, I sort mine by type. The favorite order might be tricky, though... When you query, just use something like this.. Mine has it on line 88.
$query = "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' ORDER BY type, totalclicks DESC";
I hope that I helped.
exdiogene
12-01-2009, 12:06 PM
Do you mean sort th pets they have adopted?
if so, You could add a Text box to the pet profile called order. They then can choose to type the order number. Then that adds it to the database, so that when displaying results you just add ORDER BY order
Haylzee
12-01-2009, 03:05 PM
Yep, that's how I did it. They just give each adoptable a number and their profile displays the pets in order from smallest number to the largest.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.