Thread: Abandon system
View Single Post
  #27  
Old 04-03-2010, 09:18 AM
redheadturkey redheadturkey is offline
Senior Member
 
Join Date: Jan 2010
Posts: 136
Gender: Female
Credits: 10,546
redheadturkey is on a distinguished road
Default RE: Abandon system

Figured it out myself, and this is one really great mod!!

It's basically a problem of the rows, the way they are aligned, and making sure $gender comes before date:

here's what I have now in my adopts for "kill"

Code:
$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$owner=@mysql_result($result,$i,"owner");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$isfrozen=@mysql_result($result,$i,"isfrozen");
$code=@mysql_result($result,$i,"code");
$usealternates=@mysql_result($result,$i,"usealternates");
$tradestatus=@mysql_result($result,$i,"tradestatus");
$gender=@mysql_result($result,$i,"gender");
$date=@mysql_result($result,$i,"date");
$lastbedtime=@mysql_result($result,$i,"lastbredtime");
$mother=@mysql_result($result,$i,"mother");
$father=@mysql_result($result,$i,"father");

and then:

Code:
// Actually run the execution



mysql_query("INSERT INTO ".$prefix."sales VALUES ('$aid', '$type', '$name','$owner', '$currentlevel', '$totalclicks', '$code', '', '$usealternates', '$tradestatus', '$isfrozen', '$gender', '$date','$lastbredtime', '$mother', '$father')");
mysql_query("DELETE FROM ".$prefix."owned_adoptables WHERE aid='$id' and owner='$loggedinname'");
 
mysql_query($query);


I am using Arianna's breeding system and so I have a few extras at the end. The main thing is be sure that gender is indicated on everything BEFORE the date! Otherwise it's all out of whack!

Just do this for everything, and be sure to add the gender field in the actual new table too ( I think I had to add it in ) - make sure it's in the right order too!

This works for me now, and just go through anything pertaining to this output and insertion, make sure all your ducks are in the right row, lol.

****Oh, and please note I am using the word SALES as opposed to ABANDONED for my Table --- just use whatever you like I guess, but for you at first that will be Adopts_Abandoned!
Reply With Quote