Questions and Answers

How do I collect points?

  • +4
    Chosen as best answer
  • +1
    Posted answer
  • +1
    Posted question
  • +1
    Thumb up
  • -1
    Thumb down
1

by Tinku Alias in Coding about March 9 open - report

Fetch data from table

I want to get data from table " engine4_user_fields_search" where i insereted some list of data.

Working of code inside the module User

application/modules/Lookingfor/Model/DbTable

 FieldsSearch.php

 class User_Model_DbTable_FieldsSearch extends Engine_Db_Table  {   

     protected $_rowClass = 'User_Model_FieldSearch'; //Singular

 }

application/modules/User/Model/

FieldSearch.php

class User_Model_FieldSearch extends Core_Model_Item_Abstract  {   

     protected $_owner_type = 'User';  

}

 

application/modules/User/controllers

IndexController.php

 public function indexAction()  {    

   $table = Engine_Api::_()->getDbtable('fields_search', 'User');  

echo "<pre>";  print_r($table);die;

}

I get this error in Error log

 

2017-03-10T05:17:53+00:00 CRIT (2): Error Code: a75ab1exception 'Engine_Loader_Exception' with message 'Could not load class: ‘user’_Model_DbTable_‘fields_search’' in /var/www/html/transxencare/application/libraries/Engine/Loader.php:131Stack trace:#0 /var/www/html/transxencare/application/libraries/Engine/Loader.php(160): Engine_Loader::loadClass('???user???_Mode...')#1 /var/www/html/transxencare/application/libraries/Engine/Api.php(268): Engine_Loader->load('???user???_Mode...')#2 /var/www/html/transxencare/application/libraries/Engine/Api.php(241): Engine_Api->load('???user???', 'dbtable', '???fields_searc...')#3 /var/www/html/transxencare/application/modules/User/controllers/AdminManageController.php(257): Engine_Api->__call('getDbtable', Array)#4 /var/www/html/transxencare/application/modules/User/controllers/AdminManageController.php(257): Engine_Api->getDbtable('???fields_searc...', '???user???')#5 /var/www/html/transxencare/application/libraries/Zend/Controller/Action.php(516): User_AdminManageController->viewAction()#6 /var/www/html/transxencare/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('viewAction')#7 /var/www/html/transxencare/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))#8 /var/www/html/transxencare/application/modules/Core/Bootstrap.php(84): Zend_Controller_Front->dispatch()#9 /var/www/html/transxencare/application/libraries/Engine/Application.php(160): Core_Bootstrap->run()#10 /var/www/html/transxencare/application/index.php(214): Engine_Application->run()#11 /var/www/html/transxencare/index.php(24): include('/var/www/html/t...')#12 {main}


If any know the solution please help me, am a beginner in socialengine

thanks in advance

Tinku

 

Answers: 0  •  Score 0  •  Views: 224

No answers yet. Be the first!
You must login to post an answer.