POST 500 Internal Server Error?

POST 500 Internal Server Error?

HayezbHayezb Posts: 10Questions: 1Answers: 0
edited November 2013 in DataTables 1.9
I'm setting up DataTables with CodeIgniter and using the IgnitedTables library. I'm getting a 500 Internal Server Error in my Chrome DevTools. Below is my code, any suggestions?

Controller
[code]
<?php if (!defined('BASEPATH')) die();

class Accounts extends Main_Controller {

public function index(){
if($this->session->userdata('is_logged_in')){
$this->load->view('include/header');
$this->load->view('accounts');
$this->load->view('include/footer');
}else{
redirect('frontpage');
}
}

public function tableload(){
$this->load->library('Datatables');
$this->datatables
->select('ID, ACCOUNTNAME, CONTACTNAME')
->from('LOGISTICS');
echo $this->datatables->generate();
}
}?>
[/code]

Header View - What's between my tags.
[code]







Jaysec Logistics














[/code]

View
[code]


Accounts


$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "<?php echo base_url('accounts/tableload')?>",
"sServerMethod": "POST"
} );
} );





ID
Account Name
Contact Name




Loading data from server







[/code]

And here is what I'm getting in DevTools

[code]
POST http://logistics-dev:8888/accounts/tableload 500 (Internal Server Error) jquery.js:2
send jquery.js:2
p.extend.ajax jquery.js:2
DataTable.defaults.fnServerData jquery.dataTables.js:8740
_fnAjaxUpdate jquery.dataTables.js:1897
_fnDraw jquery.dataTables.js:1430
_fnFilterComplete jquery.dataTables.js:2184
_fnSort jquery.dataTables.js:4099
_fnInitialise jquery.dataTables.js:2626
(anonymous function) jquery.dataTables.js:6793
p.extend.each jquery.js:2
p.fn.p.each jquery.js:2
DataTable jquery.dataTables.js:6366
(anonymous function) accounts:91
k jquery.js:2
l.fireWith jquery.js:2
p.extend.ready jquery.js:2
D jquery.js:2
[/code]

Replies

  • HayezbHayezb Posts: 10Questions: 1Answers: 0
    Well, just figured out how awesome DevTools really is.

    It says that my "logistics.logistics" table does not exist, when I know it does. But why is there a period and name listed twice?
  • allanallan Posts: 63,381Questions: 1Answers: 10,449 Site admin
    I'm afraid we can't really offer much help with server-side programming here - I'm not even sure what language it is that you are using (PHP?) never mind the libraries :-).

    Allan
  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    [quote]It says that my "logistics.logistics" table does not exist, when I know it does. But why is there a period and name listed twice? [/quote]
    Presumably "logistics" is the database and "logistics" is the table.
    "database.table" is standard syntax.
This discussion has been closed.