Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2014, 11:16 AM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,741
Hwona is on a distinguished road
Default Error When Trying to Edit Table

Does anyone know what I'm doing wrong with this?:
PHP Code:
   $totalAdopts $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' && tab = 0");    
        
$totalAdopts2 $totalAdopts->rowCount();
        
$pagination = new Pagination($totalAdopts210"myadopts");
        
$pagination->setPage($mysidia->input->get("page"));
        
        
$stmt $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' && tab = 0 ORDER BY totalclicks LIMIT {$pagination->getLimit()},{$pagination->getRowsperPage()}");
        if(
$stmt->rowCount() == 0){
            
$document->addLangvar($mysidia->lang->empty);
            return;
        }
        
        
$adoptTable = new TableBuilder("adopttable"650);


for(
$row 0$row 13$row++){
            
$adoptRow = new TRow("row{$row}");
            for(
$column 0$column 5$column++){
        
        while(
$aid $stmt->fetchColumn()){
            
$adopt = new OwnedAdoptable($aid);
            
$gender = new TCell($adopt->getGender("gui"));
            
$nametype = new TCell("<em>{$adopt->getName()}</em> the {$adopt->getType()}");
            
$image =new Link("myadopts3/manage/{$aid}"$adopt->getImage("gui"));
            
$clicks $adopt->getTotalClicks();
            
$level $adopt->getCurrentLevel();
            
$adoptCell = new TCell(new ArrayObject(array($image)), "cell{$index}");
                
$adoptCell->setAlign(new Align("center""center"));
                
$adoptRow->add($adoptCell);
        }}}
$adoptTable->add($adoptRow); 
I'm getting this error: Fatal error: Call to a member function count() on a non-object in /home/wallie12/public_html/classes/abstract/abstract_guicontainer.php on line 392

Thanks a bunch! :D
__________________
Reply With Quote
  #2  
Old 07-31-2014, 03:25 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 332,817
Hall of Famer is on a distinguished road
Default

Theres a chance that a cell or a row of your table has no content, this is usually where the count() member function error occurs.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 07-31-2014, 06:51 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,741
Hwona is on a distinguished road
Default

The cells and rows look full... umm, I tried editing the "index" thing, but nothing' changing...
edit: whenever I do:
$totalAdopts = $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' && tab = 0")->fetchColumn();
$totalAdopts2 = $totalAdopts->rowCount();

instead of:
$totalAdopts = $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' && tab = 0");
$totalAdopts2 = $totalAdopts->rowCount();

I get this: Fatal error: Call to a member function count() on a non-object in /home/wallie12/public_html/myadopts3.php on line 30
__________________

Last edited by Hwona; 07-31-2014 at 06:53 PM.
Reply With Quote
  #4  
Old 07-31-2014, 08:41 PM
squiggler's Avatar
squiggler squiggler is offline
Squiggling since 1995
 
Join Date: Jul 2013
Posts: 185
Gender: Unknown/Other
Credits: 8,190
squiggler is on a distinguished road
Default

Your first 0 doesn't have a semicolon.
$totalAdopts = $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' && tab = 0")->fetchColumn();
$totalAdopts2 = $totalAdopts->rowCount();

Or maybe it doesn't matter? I dunno.
__________________
Avatar courtesy of Doll Divine.
Reply With Quote
  #5  
Old 07-31-2014, 09:32 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,741
Hwona is on a distinguished road
Default

^ Thanks, but I actually had that before I tried to change the table, but it worked then.
__________________
Reply With Quote
  #6  
Old 08-01-2014, 02:07 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 332,817
Hall of Famer is on a distinguished road
Default

umm so your problem has been resolved now?
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #7  
Old 08-01-2014, 02:53 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 48,741
Hwona is on a distinguished road
Default

^ No, I was just trying to explain that that wasn't the part that wasn't functioning well. ^.^ I may just end up trying to simply style the tables, but I don't know how to do that either. XP
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone Know How to Fix a Table Hwona Questions and Supports 0 07-28-2014 10:31 AM
Change table set up in pound? Infernette Questions and Supports 0 02-09-2013 07:18 PM
Admin Cp (Table) Alaric Questions and Supports 14 04-24-2012 06:23 AM
A 2-column table? Quillink Suggestions and Feature Requests 8 09-23-2010 02:26 PM
Table Prefix fadillzzz Questions and Supports 5 01-21-2010 11:17 AM


All times are GMT -5. The time now is 01:10 AM.

Currently Active Users: 1272 (0 members and 1272 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636