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 8073521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:21:47+00:00 2026-06-05T14:21:47+00:00

I had a function that worked just fine. Then i uploaded it to the

  • 0

I had a function that worked just fine. Then i uploaded it to the live server and it gave me a 500 internal server error. After googling people said its an error you get when something(but they arent sure what) is messed up with the server. Not very helpful. others said check your error log. I have no idea how to get to it.

Function that causes the error ===============================

 private function get_workstation () {
  //================ I tried deleting all but this and that got rid of the error== //
    if ($this->input->post('search')) {
        $search = $this->input->post('search');
        $where = 'ad_name ="'.$search.'" AND';
        $this->data['search'] = $search;
    } else {
        $where = '';
    }
    // ================================================================= //
    // Pagination Code //
    $numOfRows = $this->db->query('
        SELECT distinct sys_name 
        FROM v_rollout_sysuser 
        WHERE scope_ID = '. $this->session->userdata('scopeId') .'
    ');

    if ($this->input->get('page')) {
        $pageNum = $this->input->get('page');
    } else {
        $pageNum = 1;
    }

    $limit = ($pageNum - 1 ) * 50;
    $numRows = $numOfRows->num_rows();
    $totalPages = ceil($numRows / 50);

    $this->data['pageNum'] = $pageNum;
    $this->data['prevPage'] = $pageNum - 1;
    $this->data['nextPage'] = $pageNum + 1;
    $this->data['totalPages'] = $totalPages;

    // End of Pagination Code //

    $query = $this->db->query('
        SELECT * 
        FROM v_rollout_sysuser
        WHERE '.$where.' scope_ID = '. $this->session->userdata('scopeId') .'
        GROUP BY sys_name 
        LIMIT '.$limit.',50');

    $i = 0;

    foreach ($query->result() as $row) {
        $i = $i + 1;
        $data['i'] = $i;
        $data['ro_ID'] = $row->ro_ID;
        $data['sys_name'] = $row->sys_name;
        $data['EAM_Model'] = $row->EAM_Model;           
        $data['EAM_User'] = $row->ad_account;
        $data['ad_DispName'] = $row->ad_DispName;
        $data['search'] = $this->input->post('search');

        $systems[] = $data;
    }

    if(isset($systems)) {
        $this->data['systems'] = $systems;
    } else {
        $this->data['systems'] = null;
    }

}
  • 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-06-05T14:21:49+00:00Added an answer on June 5, 2026 at 2:21 pm

    As it turns out there was a problem with the database. Sorry to those who spent time trying to help. The guy running the database found the problem. Thank for trying though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

void spawn_enemies(vector<Enemy>& enemies) { I had that function, and it worked just fine to
Prior to C++11, if I had a function that operated on large objects, my
I've had trouble writing this code. I'm supposed to make a function that can
I had some code that constructed an object: function gridObjConst(id, itemName, itemPrice, itemListPrice, width,
I had a query as below in my function. In that I need to
I had a problem with some JavaScript functions that had me scratching my head
The old JS SDK had a function called FB.ensureInit. The new SDK does not
I had written a function to generate a word document by using the Office
I had only one function to Add another row to the table id=tblOtherParties and
I want to define a constant in objective-c. Previously I had the following function:

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.