PHP Classes

error message

Recommend this page to a friend!

      Nested Set DB Table  >  All threads  >  error message  >  (Un) Subscribe thread alerts  
Subject:error message
Summary:demo page
Author:Joan Grinde
Date:2009-11-09 15:40:45
Update:2009-11-14 14:45:18

  1. error message   Reply   Report abuse  
Picture of Joan Grinde Joan Grinde - 2009-11-09 15:40:45
i'm try your package and the demo page retourn this error:
Fatal error: Call to a member function fetchAll() on a non-object in /home/septiman/public_html/nested/tests/1/NestedSetDbTable/DbAdapter/Default.php on line 181

  2. Re: error message   Reply   Report abuse  
Picture of Nikola Posa Nikola Posa - 2009-11-14 14:45:18 - In reply to message 1 from Joan Grinde

I hope that you've checked example class on this path: NestedSetDbTable/tests/1/DbTable/NestedCategory.php. That is the example of how NestedSetDbTable class should be used. You should extend it and use it as a model (in words of MVC) in your project. Note that table name ($_name) is set to "nested_category". That's just for that example, so you should create table with that name in your database, or rename that property to something else. Also note names that were assigned to other class members: $_primary, $_lft, $_rgt, as they must also correspond to names of columns of your table.