Hi everybody,

 I have this error.anybody,plz help me.how to solve this problem.

 store all the data in database.but view the data in index page.

 nothing to display.

class PlanbookTable extends Doctrine_Table
public function updatePlanbook($data)
        if ($data["id"]) {
            $planbook = Doctrine::getTable("Planbook")->find

        else {
            $planbook = new Planbook();



class Planbook extends BasePlanbook

 public function getDataInArray()
        $data = array();

        $data['personal_id'] = $this->personal_id;
        $data['title_name'] = $this->title_name;
        $data['photo'] = $this->photo;
        $data['country_id'] = $this->country_id;
        $data['zone_id'] = $this->zone_id;
        $data['place'] = $this->place;
        $data['occasion'] = $this->occasion;
        $data['itinerary'] = $this->itinerary;
        $data['description'] = $this->description;
        $data['date'] = $this->date;

        return $data;

    public function saveDataInArray($data)
        $this->title_name = $data['title_name'];
        $this->photo = $data['photo'];
        $this->country_id = $data['country_id'];
        $this->zone_id = $data['zone_id'] == '' ? null : $data['zone_id'];
        $this->place = $data['place'];
        $this->occasion = $data['occasion'];
        $this->itinerary = $data['itinerary'];
        $this->description = $data['description'];
        $this->date = $data['date'];



class planbookActions extends sfActions
  public function executeIndex(sfWebRequest $request)
    $this->planbooks = Doctrine_Core::getTable('Planbook');
       $this->planbook = Doctrine_Core::getTable('Planbook')->find(array


            $this->planbooks = Doctrine::getTable('Planbook'); 


public function executeEdit(sfWebRequest $request)
    $planbook = Doctrine_Core::getTable('Planbook')->find(array($request-

    $this->form = new PlanbookForm($planbook);
//get the submitted values
    //check total error
 if(count($error)==0) {



$planbook = $planbook->getDataInArray();

  public function executeUpdate(sfWebRequest $request)
    $this->forward404Unless($request->isMethod(sfRequest::POST) || $request-

$planbook = Doctrine_Core::getTable('Planbook')->find(array($request-

  //  $this->form = new PlanbookForm($planbook);

   // $this->processForm($request, $this->form);
return $this->renderText($result);



<ul class="planbook-list" >
<?php foreach ($planbooks as $planbook): ?>
<li  class="planbook-item">

 <div class="clear-both"></div>
<?php echo $planbook->getTitleName() ?>
<?php echo $planbook->getDescription() ?>
<?php endforeach ?>

Recommended Answers

All 6 Replies

At line no 79.
should be


i did,but still this error was comming.plz help me.

500 | Internal Server Error | Doctrine_Table_Exception
Unknown method PlanbookTable::getPlanbook
stack trace

    at ()
    in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib\vendor\doctrine\Doctrine\Table.php line 2856 ...
                        return call_user_func_array(array($this->getRecordInstance(), $method . 'TableProxy'), $arguments);
                    } catch (Doctrine_Record_UnknownPropertyException $e) {}
                    throw new Doctrine_Table_Exception(sprintf('Unknown method %s::%s', get_class($this), $method));

Have you created all classes by your own?
Where is getPlanbook function defined?

Hi every thing is my own class.i used symfony doctrine form creation.My table name is Planbook.now i have problem in how to view datas in index page.you have solution.plz tell me.how to view all the datas in indexpage.
no doubt all the class in my own class.i am new in php and symfony.


Sorry i don't know symfony.
But trying.. Add below function in PlanbookTable class.

public function getPlanbook()
       return Doctrine::getTable("Planbook")->findAll;       

Thnaks for ur reply. that error was solved.but still no data display in index page.what is the problem.plz help me.how to view data in index page.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.