How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Pete Your Own Question
Pete, Computer Engineer
Category: Programming
Satisfied Customers: 17261
Experience:  Over 16 years of experience in computer programming.
Type Your Programming Question Here...
Pete is online now
A new question is answered every 9 seconds

Using a zend 1 framewokr cannot get my function from my model

Customer Question

using a zend 1 framewokr cannot get my function from my model and action which i declared in the controller to show up on the view file no matter how i echo it out!.
Submitted: 2 years ago.
Category: Programming
Expert:  Pete replied 2 years ago.
Hi there, Check that you are using valid syntax for Zend 1, and that you have the latest release installed.You may need to add a custom initializer, for example.Let me know what error message you are getting, or attach some code so I can test it.
Customer: replied 2 years ago.
heres the funtion in the reviewer.php model
public function getTraining($user_id) {
$select = $this->getAdapter()->select()
->from($this->_name, array('*'))
->join('stbl_contacts', $this->_name . '.ein=stbl_contacts.educator_id', array())
->where('stbl_contacts.user_id = ?', $user_id)
->order('course_date DESC');
$rows = $this->getAdapter()->fetchAll($select);
return $rows;
}heres the action being called in the index controllerpublic function subordinatereviewdashboardAction() {
$btNS = new Zend_Session_Namespace('bt');
if ($btNS->srId == "") {
/* This area added by PCC 01/04/2011 for reviewer review paper count */
$rpFeedbackObj = new ReflectionPaperFeedback();
$currM = intval(date('m'));
$currY = intval(date('Y'));
if ($currM > 8) {
$start_date = sprintf("%d-09-01", $currY);
$end_date = sprintf("%d-08-31", $currY + 1);
} else {
$start_date = sprintf("%d-09-01", $currY - 1);
$end_date = sprintf("%d-08-31", $currY);
$this->view->review_count = $rpFeedbackObj->getReviewCount($btNS->user_id, $start_date, $end_date);
//$this->view->review_count = $rpFeedbackObj->getReviewCount($btNS->user_id);
//$teamUserObj = new TeamUser();
//$reviewerInfo = $teamUserObj->getReviewerInfo($btNS->user_id);
//$this->view->reviewer_plan = $reviewerInfo['reviewer_plan'];
$this->view->reviewer_plan = REVIEW_LIMIT;
$this->view->user_permissions = $btNS->permissions;
/* end of review paper count logic */
$con = new Contacts();
$isUserProfileConflict = $con->isUserProfileConflict($btNS->srId);
// Get Reviewer District Option
$reviewOptionObj = new ReviewOption();
$this->view->reviewOption = $reviewOptionObj->checkReviewOption($btNS->distId);
// end Get Reviewer District Option
$this->view->isUserProfileConflict = $isUserProfileConflict;
$this->view->inc_nifty = true;
$this->view->srId = $btNS->srId;
$this->view->controller = $this->getRequest()->getControllerName();
$this->view->distId = $btNS->distId;
$this->view->moduleImg = 'none';
$reviewersObj = new Reviewer();
$this->view->user_id = $reviewersObj->getTraining($btNS->user_id);
in the view here is the snippet of code for the html where i want the php output to go for the most recent training dateMost Recent Training: <?php
//echo $this->user_id; ?>
Customer: replied 2 years ago.
cannot get most recent training date to show up at all need help getting that echo

Related Programming Questions