it's $actsAs = array('Tree'); //you forgot s....
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/1/28 raymond <raymond...@gmail.com>

> Hi.
> I have tried Tree behavior just according to manual, but it reports
> error following:
>
> Warning (512): SQL Error: 1064: 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 'generatetreelist' at line 1
> Query: generatetreelist
>
> I debugged and found that cakePHP does not understand the method
> generatetreelist()
>
> I have created table 'lkp_itemcate' with following columns:
> id, parent_id, lft, rght, name, img_url, level, created, modified.
>
> And then created model file:
>
> class Itemcate extends AppModel {
>        var $name = 'Itemcate';
>        var $tablePrefix = 'lkp_';
>        var $useTable = 'itemcate';
>
>        var $actAs = array('Tree');
> }
>
> and inserted following code to controller action:
>
> $list = $this->Itemcate->generatetreelist(null, null, null,
> '&nbsp;&nbsp;&nbsp;');
>
> Any advice?
> Thanks.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to