Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Rendering deleting bottom half of page...

edited February 2007 in Vanilla 1.0 Help
Here is my Render function: function Render() { //$All = $this->Context->ObjectFactory->NewContextObject($this->Context, 'SuperCategoryManager'); $select = $this->Context->ObjectFactory->NewObject($this->Context, 'SqlBuilder'); $select->SetMainTable('SuperCategory', 'sc'); $select->AddSelect('Parent', 'sc', 'Parent'); $select->AddWhere('sc', 'Parent', '', 0, '='); $Result = $this->Context->Database->Select($select, $this->Name, 'GetAll', 'Error'); $HTML = ""; $this->CallDelegate('PreRender'); while($Row = $this->Context->Database->GetRow($Result)) { $HTML .= "Hi there"; } echo "Mex"; $this->CallDelebate('PostRender'); } When I render my object onto the page, it'll only load the header and then everything else is gone. I tried commenting out the loop and it acted the same so I know the problem isn't the loop. When I commented everything out, except for "echo 'Mex', it worked fine. I think the problem is how I'm using SqlBuilder...does anyone have any suggestions?

Comments

  • Options
    use 'CallDelegate', not 'CallDelebate'
  • Options
    edited February 2007
    Yeah, I changed that but it still didn't work....I also changed $select = $this->Context->ObjectFactory->NewObject($this->Context, 'SqlBuilder'); to $select = $this->Context->ObjectFactory->NewContextObject($this->Context, 'SqlBuilder'); I've been trying to make this work for 5 hours and NOTHING I DO is working...this is really frustrating...does anyone else have a solution? I'm getting this error: The error occurred on or near: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as ID, s. as Parent from LUM_ s where s. = '0'' at line 1
  • Options
    Nevermind, I found the problem....I didn't add the new database table to the database.php conf file... :/
  • Options
    Haha. Today is the day for silly mistakes. I just spent a while debugging an extension I'd forgotten to enable :)
This discussion has been closed.