Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6251665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:39:23+00:00 2026-05-24T13:39:23+00:00

<?php /** * clmsRegistration * * @author MGUCS-07 * @version */ require_once ‘Zend/Db/Table/Abstract.php’; class

  • 0
    <?php
/**
 * clmsRegistration
 * 
 * @author MGUCS-07
 * @version 
 */
require_once 'Zend/Db/Table/Abstract.php';
class ClmsRegistrationModel extends Zend_Db_Table_Abstract
{
    /**
     * The default table name 
     */
    protected $_name = "clms_registration";
    protected $_primary = "user_name";


    public static function changePassword($username, $newpassword)
    { //changes the password
        try {
            $chps= new ClmsRegistrationModel();
            $row = $chps->find($username);
            $row1 = $row->current();
            $row1->password=$newpassword;
            $row1->save();
        }
        catch (Zend_Db_Exception $e)
        {
            $e->getMessage();
        }       
    }

    public static function checkUsed($username)
    {  //check whether used or not
        try {
        $table = new ClmsRegistrationModel();
        $row=$table->find($username);
        if($row)
        {
            return 1;
        }}
        catch (Zend_Db_Exception $e)
        {
            $e->getMessage();
        }   

    }

    public static function deleteUser($user_name)
    { //deletes a user
        try { 
            $deluser=new ClmsRegistrationModel();
            $row = $deluser->find($user_name);
            $row1=$row->current();
            $result = $row1->delete();
        }
        catch (Zend_Db_Exception $e)
        {
            $e->getMessage();
        }   
    }

    public static function updateUser($user_name,$district,$email_id,$phone_number)
    {
        //updates the details of the user
        try {
            $upUser = new ClmsRegistrationModel();
            $row = $upUser->find($user_name); 
            $row1=$row->current();
            $row1->district= $district;
            $row1->email_id= $email_id;
            $row1->phone_number= $phone_number;
            $row1->save();
        }
        catch (Zend_Db_Exception $e)
        {
            $e->getMessage();
        }

    }

    public static function getRole($user_name)
    { //gets the role of the user
        try {
            $roq= new ClmsRegistrationModel();
            $u= $roq->fetchRow($roq->select()->where('user_name=?',$user_name));
            return $u->toArray();
        }
        catch (Zend_Db_Exception $e)
        {
            $e->getMessage();
        }   

    }

    public function isActive($user_name)
    { //select active user
        try {
            $roq = new ClmsRegistrationModel();
            $u= $roq->fetchRow($roq->select()->where('user_name=?',$user_name));
            return $u->toArray();
        }
        catch (Zend_Db_Exception $e)
        {
            $e->getMessage();
        }   
    }
    public function setActive($user_nam)
    { //sets user active 
        try {
            $roq = new ClmsRegistrationModel();
            $row= $roq->find($user_nam);
            $row1=$row->current();
            $row1->user_name= $user_nam;
            $row1->status1 = 1;
            $row1->save();
        }
        catch (Zend_Db_Exception $e)
        {
            $e->getMessage();
        }   
    }
    public static function setRole($user_name,$role)
    { //sets the role of the user
        try {
            $reg=new ClmsRegistrationModel();       
            $row = $reg->find($user_name);
            $row1= $row->current();
            $row1->role_organization=$role;
            $row1->save();
        }
        catch (Zend_Db_Exception $e)
        {
            $e->getMessage();
        }   
    }

    public function  register($uname,$pass,$role,$en,$status,$email,$ph,$date,$dis)
    {// function  for registration purposes

         try{

            $reg = new  ClmsRegistrationModel();
            $row =$reg->fetchNew();
            //$row= $row->current();
            $row->user_name = '$uname';
            $row->password = '$pass';
            $row->role = $role;
            $row->employee_name=$en;
            $row->status1=$status;
            $row->email_id =$email;
            $row->phone_number =$ph;
            $row->date =$date;
            $row->District=$dis;
            $row->employe_id =$row->employe_id +1;
            $row->save();
            //$reg->save();
         }
         catch (Zend_Db_Exception $e){
            $e->getMessage();
         }


}
}

This is my model class and getting that error.
Please tell why this error and how to debug it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:39:24+00:00Added an answer on May 24, 2026 at 1:39 pm

    try this

     $reg = new  ClmsRegistrationModel();
                $row1 =$reg->createRow();
                $row1->user_name = $uname;
                $row1->password= $pass;
                $row1->role = $role;
                $row1->employee_name=$en;
                $row1->status1=$status;
                $row1->email_id =$email;
                $row1->phone_number =$ph;
                $row1->date =$date;
                $row1->District=$dis;
    
    
            $row1->save();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

PHP Version: 5.3.3 I'm using the SOAP extension to pull data from a web
php > require_once('System.php'); php > System::users(); PHP Fatal error: Call to undefined method System::users()
Php code: class build { function panel() { $dummy=Lorem ipsum dolor sit amet, consectetur
My php is this echo <li><a href='report_view.php?id= . $row['id'] . '>ID:(<span class='id'> . $row['id']
my PHP version is 5.3.5. The code: $num = $_REQUEST['num'] ?: 7; The error:
//PHP CODE <?php $xmlData='<OTA_HotelDestinationsRQ Version=1.0> <POS> <Source> <UniqueId Id=user:password /> </Source> </POS> <DestinationInformation LanguageCode=EN
PHP has a great function called htmlspecialcharacters() where you pass it a string and
PHP's explode function returns an array of strings split on some provided substring. It
PHP, as we all know is very loosely typed. The language does not require
PHP stores its session information on the file system of the host of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.