View Single Post
  #1  
Old 02-12-2013, 06:52 AM
Infernette Infernette is offline
CODE CODE CODE CODE CODE
 
Join Date: Jan 2013
Location: Where I live? I live home.
Posts: 164
Gender: Female
Credits: 24,362
Infernette is on a distinguished road
Default Okay One more question XD

Code:
elseif(!$mysidia->input->action()){
   // No action specified yet, show the default page for myadopts.php
   $mysidia->page->settitle($lang->title);
   $totaladopts = $mysidia->db->query("SELECT count(*) FROM ".constant("PREFIX")."owned_adoptables WHERE owner = '{$mysidia->user->username}'")->fetchColumn();
   $rowsperpage = 10;
   $pagination = new Pagination($totaladopts, $rowsperpage, "myadopts.php");
   $pagination->setPage($mysidia->input->get("page"));
   
   $stmt = $mysidia->db->join("adoptables", "adoptables.type = owned_adoptables.type")
					   ->select("owned_adoptables", array(), constant("PREFIX")."owned_adoptables.owner = '{$mysidia->user->username}' ORDER BY ".constant("PREFIX")."owned_adoptables.totalclicks LIMIT {$pagination->getLimit()},{$rowsperpage}");
   $table = new Table("My Adopts", array("", "Name and Type", "Image", "Clicks", "Description"));	
   $mysidia->page->addcontent($table->getheader());
  
   while($adopt = $stmt->fetchObject()){
      $level = $mysidia->db->select("levels", array("primaryimage", "alternateimage", "description"), "adoptiename='{$adopt->type}' AND thisislevel='{$adopt->currentlevel}'")->fetchObject();
	  if($adopt->currentlevel == 0) $image = $adopt->eggimage; 
	  elseif($adopt->usealternates == 'yes') $image = $level->alternateimage; 
	  else $image = $level->primaryimage;
	  
	  $table->buildtable(array("<img src='picuploads/{$adopt->gender}.png'>", "<em>{$adopt->name}</em> the {$adopt->type}", "<a href='myadopts.php?action=manage&id={$adopt->aid}'><img src='{$image}'></a>", $adopt->totalclicks, $level->description), "center");
	  $mysidia->page->addcontent($table->showtable());	  
   }
   
   $mysidia->page->addcontent($table->endtable());
   $mysidia->page->addcontent("<br /><br />{$pagination->showPage()}</div>");   
}
For some reason it refuses to show the description I have set. Instead, it gives me a blank description column on the myadopts page.
The column is supposed to be there... The blankness, not so much XD
http://www.iaza.com/work/130213C/iaza13908934338900.png
http://www.iaza.com/work/130213C/iaza13908946877000.png


I swear I think this hates me. XD
__________________
No, I have no idea what I'm doing. But it works. Barely.
Reply With Quote